General discussion

  • Creator
  • #2073850

    Changing Root shell


    by volksjager ·

    I have a user who has foolishly tried to change the shell type that root uses to bash by vi’ing the /etc/passwd file. Unfortunately whenever you try to login as root it states that no shell is available and promptly throws you out. Can anyone offer any suggestions to help me fix this problem?

All Comments

  • Author
    • #3783137

      Changing Root shell

      by mightyduk ·

      In reply to Changing Root shell

      i foolishly did the same thing a while back. With solaris there are instructions for recovering the passwd file. You need to boot from floppy/cd then mount the hard disk’s file system. Go to the appropriate location and make the correction. Reboot and all should be fixed (note: this worked with solaris, don’t know about anything else).

    • #3782943

      Changing Root shell

      by rkeckler2000 ·

      In reply to Changing Root shell

      Sun – Boot with cdrom. On boot up use the Stop-a keys and type ‘boot cdrom’ at the OK prompt
      mount the boot sector
      ‘mount /dev/dsk/c0t3d0s0 /a’
      “on newer sun boxes it is c0t0d0s0”
      vi /a/etc/passwd
      change the root shell and save

      On Linux you must boot from cdrom or the rescue disk
      again mount the root partition either /dev/hda? or /dev/sda? and vi the passwd file.
      That should do it.

    • #3783582

      Changing Root shell

      by avl ·

      In reply to Changing Root shell

      Boot in single mode and chenge the root shell by using command chsh from single mode

Viewing 2 reply threads