Results 1 to 7 of 7
Hi,
I have server, in which multiple administrators login and do the changes. one of the administrators while working on the server, has modified the /etc/passwd file unnoticigly. the root ...
- 07-10-2007 #1Just Joined!
- Join Date
- Nov 2004
- Location
- no.657 5th cross 2nd main
- Posts
- 9
root username changed!!!
Hi,
I have server, in which multiple administrators login and do the changes. one of the administrators while working on the server, has modified the /etc/passwd file unnoticigly. the root username is changed to 'oot' in /etc/passwd file.
" oot
:0:0:super-user:/:/sbin/bash "
The server is very critical and we cannot reboot to Single user mode.
Does any one have the script/steps to change the name from 'oot' to 'root'.
Regards,
Anjan
- 07-10-2007 #2
Can't you login as oot, and change the passwd file?
I think multiple Admins is just asking for trouble, unless every person documents every single thing they do, you're going to have this problem.I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
- 07-10-2007 #3Just Joined!
- Join Date
- Nov 2004
- Location
- no.657 5th cross 2nd main
- Posts
- 9
No, I can't login as 'oot', Is there any script to change back to 'root'?
Regards,
Anjan
- 07-10-2007 #4Linux User
- Join Date
- Oct 2004
- Location
- /dev/random
- Posts
- 404
I don't know if the following will work - use it at your own risk!
I suggest you try it on a standalone - non-critical system first before using on the main server...
Login as a normal user and doIt would ask for the root password and you should be able to edit /etc/passwd.Code:su -
Give it a try and let us know if it works - but again, don't hold me responsible for any loss...
HTH
The Unforgiven
Registered Linux User #358564
- 07-11-2007 #5Just Joined!
- Join Date
- Nov 2004
- Location
- no.657 5th cross 2nd main
- Posts
- 9
Thanks for the suggestion.
I tried this option but it is not allowing me to login to root.
problem continues...
Regards,
Anjan
- 07-11-2007 #6Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
If it is not allowing you to log in as either 'root' or 'oot' and it will not allow you to used su or sudo then I see no choice but to power down and boot to a live CD to make the change. I know you said it is a critical server taht can't afford downtime but all other avenues have been exhausted.
It would be much better to schedule this for a less busy time now that to be caught out needing root privelage later on at a critical time.
- 07-12-2007 #7Just Joined!
- Join Date
- Jul 2007
- Location
- CA
- Posts
- 5
you cant do it since there's no "oot" in the shadow file. what you need is to control the situation. inform all users that you will have a maintenance to be done and boot from the cd and choose update the system. good luck
then u may want to copy the line of root in /etc/passwd and /etc/shadow and change the new line to "toor" or whatever u want. insert it in the middle of the passwd and shadow file. then input a new password for it. so next time this happens again you have an alternative account as root.. good luck


Reply With Quote
