How to Remove Linux root Password & Set Up New

How to Remove Linux root Password

Incorrectly editing any of the files in the /etc/directory can severely screw up a system. Please keep a spare copy of any files in case you make a mistake

If your Linux distribution permits, try booting into single−user mode by typing single at the BOOT lilo: prompt. With more recent distributions, you can boot into single−user mode when prompted by typing linux 1, linux single, or init=/bin/bash

If the above doesn't work for you, boot from the installation or rescue floppy, and switch to another virtual console with Alt−F1 to Alt−F8, and then mount the root file system on /mnt Then proceed with the steps below to determine if your system has standard or shadow passwords, and how to remove the password
Using your favorite text editor, edit the root entry of the /etc/passwd file to remove the password, which is located between the first and second colons. Do this only if the password field does not contain an x, in which case see below
root:HkgeW13xl:0:0: ...

Change that to:
root::0:0: ...

If the password field contains an x, then you must remove the password from the /etc/shadow file, which is in a similar format. Refer to the manual pages: man passwd, and man 5 shadow


Related Topic Ubuntu User Account Management Linux Commands
CentOS Latest Version Download & Installation Guide
Install MySQL Database Server in Linux Ubuntu
A to Z Linux Commands quick reference sheet
How to Backing-Up and Restoring Desktop Datas in linux Machine

nScraps.com 2011   Privacy Policy  Terms of Service  Feedback