Renaming Root
I have changed the name of my root account in /etc/passwd as "abc", After that I can not be able to login as root, neither can i use the name "abc" for login. Is their any method to overcome this problem.
|
That was something you did NOT want to do----but I supect you already know that now.....;)
You can recover by rebooting into single-user mode and editing the file: When the GRUB menu appears, hit "escape" to get into text mode, then hit "e" for edit. Select the kernel line, "e" again, and add the word "single" (no quotes) at the end. Hit enter, and then "b" to boot. You will boot up into a terminal, running as root. You can also boot from a live CD and edit the file from there. |
And in addition to that: the procedure only went pear-shaped because
you only changed the entry in /etc/passwd, and the entry in /etc/shadow didn't match ... |
What did you plan to achieve by renaming root?
If you only wanted a different username with root privileges, then you should have created a new user, and then adding it to the sudoers list. I'm sure you will find a lot of Google results for sudo and sudoers to explain how that is to be done. ---------- T74marcell Arch Linux |
Obfuscation ;}
If you use a weak password like 0rANge, making the username something like falafel instead of root makes it harder to gain access ;D |
root is a user with UID=GID=0. So to change the name, you just create a user with UID=GID=0 and lock root. Although, I would also recommend locking root anyway and using sudo instead, like the user above said.
|
Use vipw(8) if you're going to edit /etc/passwd. And changing the root account's name should be # 1,001 on your list of 1,000 ways to secure GNU/Linux. (i.e. It didn't make the list.)
|
All times are GMT -5. The time now is 01:40 PM. |