简体   繁体   中英

How to Add root Password to Ramdisk

Hope all are doing good...

Here, I was created Ramdisk by using this guide ( RAMDISK )and stored it into the NAND flash. By the default there is no password for root login. So I want to add the root password. How to add the root password in that Ramdisk?

You can set up the root password to your live system first, and then while copying its files to the ramdisc as is described in the manual it will automatically taken over to there. Some relevant files: /etc/passwd, /etc/group, /etc/shadow. How to set up the root passwd depends on the configuration of your linux distro. In general case: man passwd or google "how to change root passwd for YOUR_DISTRO"

EDITED: alternatively, you can do the job what the passwd does but with the mentioned before files from your ramdisk just editing them. But in this case you need more knowledge how your system is configured.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM