I lost a root password and i need to give it, I treid to
change it through single usermode even though i am not get
a password, then what is the other procedure to give a root
password?
Answer Posted / kvenkat
Login into single user mode and try below things:
1. passswd [ Change Password for root ]
2. rm -rf /etc/nologin
3. remove any "nologin" shell for root user in /etc/passwd file
4. chage -l root then chage -E root
5. passwd -u root
6. chattr -i /etc/passwd /etc/shadow
7. chmod 600 /etc/securetty
8. vim /etc/rc.local --> then remove any line like say "
/etc/nplogin "
9. chsh root [ /bin/bash ]
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How cp command works in linux?
What is the export command used for?
What is mask and umask in linux?
Write a command that will do the following: -look for all files in the current and subsequent directories with an extension c,v -strip the,v from the result (you can use sed command) -use the result and use a grep command to search for all occurrences of the word orange in the files.
What are grep commands?
Which is the required command for checking the file system?
Why is linux cpu usage so high?
What is history command in linux?
What is the command to delete a file linux?
What is type command in linux?
What does df command do in linux?
can any one send me one project on linux ...?
Which command will show you free/used memory? Does free memory exist on linux?
Who command in linux?
How do I run a shell script?