zoukankan      html  css  js  c++  java
  • openstack 官方镜像qcow2 下载和修改密码

    下载地址:

    CentOS6:http://cloud.centos.org/centos/6/images/

    CentOS7:http://cloud.centos.org/centos/7/images/

    Ubuntu14.04:http://cloud-images.ubuntu.com/trusty/current/

    Ubuntu16.04:http://cloud-images.ubuntu.com/xenial/current/

    修改密码:

    原文:https://access.redhat.com/discussions/664843

    在使用QEMU或在QEMU-KVM时,如果不知道下载的image文件的root用户的密码,可以使用guestfish工具去修改。

    Using “guestfish” to change the Password for the root account:
    1)You can use guestfish to edit a running system under KVM virtualization
    2)You can use “guestfish” to edit the /etc/shadow file and change the root password.
    3)Guestfish is an interactive shell that you can use from the command line or from shell scripts to access guest virtual machine file systems. (See example below):
    安装guestfish:
    yum -y install guestfish//RHEL
    yum -y install libguestfs-tools//FEDORA

    Import the qcow2 image into KVM. The image will be named something along the lines of: “rhel-guest-image-7.1-20150224.0.x86_64.qcow2”, (as of July 2nd, 2015, the version will of course change over time)
    Change the password on the newly imported KVM to get on the pre-built system.

    Example steps to change the root password using guestfish:
    This set of instructions is for use on the host system that has the kvm RHEL 7 guest.
    The syntax is: guestfish –rw -a
    (Note, your system may be /dev/vda1, mine was /dev/sda1. Use the ‘list-filesystems’ command)

    root@box1 # guestfish --rw -a ./rhel-guest-image-7.1-20150224.0.x86_64.qcow2
    ><fs> run
    ><fs> list-filesystems
    ><fs> mount /dev/sda1 /
    ><fs> vi /etc/shadow
    ><fs>quit //退出
    >
    //可以在其他命令行下面,使用下面的命令生成新密码
    [root@someothersystem ~]# openssl passwd -1 changeme
    $1$QiSwNHrs$uID6S6qOifSNZKzfXsmQG1
  • 相关阅读:
    python 网络编程 socket模块中的常用方法
    python 网络编程 主要是黏包 三种解决方案
    python 网络编程 tcp/dcp 通信 和 时间同步机制
    python 网络编程 计算机部分基础 和初识tcp和udp
    python 包和模块
    python 包和模块 有固定的包格式自己注意
    Jquery常用的一些事件 keyup focus
    常规的页面布局
    校验输入正整数
    遍历input文本框
  • 原文地址:https://www.cnblogs.com/sxwen/p/8178601.html
Copyright © 2011-2022 走看看