Discussion Locked
0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
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?
6 replies
by mightyduk
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).
by volksjager
by rkeckler2000
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
reboot
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.
by volksjager
by avl
Boot in single mode and chenge the root shell by using command chsh from single mode
by volksjager
This discussion is closed to new replies.
Trending Linux posts
Sort by Trending
0 helpful
7 replies
0 helpful
6 replies
Question Locked
RE: How to fix the Docker and UFW security flaw
0 helpful
3 replies
Discussion Locked
Which Linux works best on old phone or tablet?
0 helpful
5 replies
Discussion Locked
My Job and Company
0 helpful
3 replies