Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    root account problem


    Hi,

    In fact, I have done something foolish,

    I have updated /etc/passwd as follow:

    1- comment the line

    #root:0:0:root:/root:/usr/bin/sudosh

    2- add a line

    root:0:0:root:/root:/usr/bin/bash, but bash in my server locates in /bin not in /usr/bin, so,

    I cannot log in as root at all, in addition there is no sudoers on the system to edit the file,

    for me it is a horrible situation.

    How can I solve something like this problem ??

    thanks

  2. #2
    Linux Guru
    Join Date
    Dec 2013
    Location
    Victoria, B.C. Canada
    Posts
    2,103
    Boot into single user mode and you'll be able to repair the system

  3. #3
    It seems you skipped second field, line must be below:

    Code:
    root:x:0:0:root:/root:/bin/bash
    You have to mount your root filesystem and correct the errors. There are lots of way to do this. For example you can boot from a live cd.

  4. $spacer_open
    $spacer_close

Posting Permissions

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