I am having some troubles on my Solaris 8 computer. I don't know how this happened, but the path of the user root has changed in /etc/passwd, therefore I can't become the root user anymore.

Under normal circumstances, the path is like this:


But now it's like this:


The directory /root doesn't exist.

I can not edit /etc/passwd because I don't have the necessary privileges to do it.

  • Can you use su, or sudo to become root from another user? Nov 14 '18 at 13:15

Assuming this is on SPARC, boot in single user mode from the OK prompt:

StopA, then boot -s

You should then be able to fix the /etc/passwd file.

  • Thnks for your answer, i'll try it and let you know. And yes it's a SPARC
    – Hohenheim
    Nov 12 '18 at 10:01

If you know the root password, you should also be able to fix the problem using a simple su command (I don't have access to a Solaris 8 system to test):

  • Issue the su command - without any arguments
  • Enter the root password to become root without going through the full login shell process
  • Fix the problem. Either create a root:root-owned /root directory with 0700 permissions, or restore the /etc/passwd entry. You may need to explicitly set ownership and/or file permissions with chown and/or chmod.
  • Either way, fix the root shell and restore it to /sbin/sh. /bin/csh is not statically linked and can depend on filesystems not mounted immediately at boot, another way of making the root account inaccessible. Do not change the root shell from /sbin/sh on Solaris 8. Doing so indicates a lack of understanding of Solaris 8 along with a closed-minded and dangerous fixation on the part of an admin to only using and understanding a limited toolset.

Follow on steps:

  • Find a PDF copy of the Solaris 8 man pages section 1M: System Administration Commands
  • Print out the entire book
  • Bring printed out pages to a bookbinder
  • Bind man pages into big book
  • Identify SA who broke the root account on this system
  • Pound said SA over the head with big man pages book for being stupid enough to change the root account on a system without understanding the consequences.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.