Code Monkey home page Code Monkey logo

change-root-passwd's Introduction

change-root-passwd

有时从网上下载的虚拟机镜像,没有root密码,必须通过秘钥登录,然后秘钥又需要麻烦的注入到里面去。想用,却无法登录,很头痛。
该脚本用于修改虚拟机镜像的roo密码,使用时,changerootpasswd.py\changerootpasswd.sh两个文件需要放在同一目录下面,使用前请安装python-guestfs及相关包。
ubuntu系统执行:
sudo apt-get install python-guestfs 
centos系统请执行: 
sudo yum install python-libguestfs 
执行: 
sudo bash changerootpasswd.sh ubuntu.qcow2 123456
即可将ubuntu.qcow2镜像的root登录密码设定为123456.该脚本可支持多种镜像格式,经过验证的有raw\qcow2。

change-root-passwd's People

Contributors

xuriwuyun avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.