Find the answer to your Linux question:
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 ...
  1. #1
    Just 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

  2. #2
    Super Moderator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,144
    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.

  3. #3
    Just 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

  4. #4
    Linux 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 do
    Code:
    su -
    It would ask for the root password and you should be able to edit /etc/passwd.

    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

  5. #5
    Just 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

  6. #6
    Linux 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.

  7. #7
    Just Joined!
    Join Date
    Jul 2007
    Location
    CA
    Posts
    5
    Quote Originally Posted by anjanprasad View Post
    No, I can't login as 'oot', Is there any script to change back to 'root'?

    Regards,
    Anjan
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...