Root default shell incorrect


 
Thread Tools Search this Thread
Operating Systems Solaris Root default shell incorrect
# 1  
Old 04-22-2004
Root default shell incorrect

The root default shell is defined incorrectly in the /etc/passwd file and thus when I try and log in as root I get a NO SHELL error and get logged out..


Anyway of fixing this - as I dont have a session logged in as root currently and I am unable to initiate a new session as I keep getting the error above??
# 2  
Old 04-22-2004
Is there no easier way to carry this out as I do have the root password - I just need to modify the /etc/passwd file or use admintool to correct the incorrectly defined default shell for the root user
# 3  
Old 04-22-2004
There is no other way to do it. You have to boot into single user from the cd to correct errors on the root account, correct corrupt password / shadow files, fix / partition problems when the system won't boot and other assorted fun fixes.
# 4  
Old 04-22-2004
ah - its okay I got lucky...
small security hole on the server I am using let me get root to submit a script to copy a modified passwd file in over the existing one...

Thank god!
# 5  
Old 04-22-2004
Another possible option in this case would have been logging in as somebody else, then using sudo to become root using their password. Of course, if you didn't have sudo set up already you couldn't do that.

Hmmm, one other thought I had, but don't know for sure. What if you did a su root *without* the dash that tells it to use root's environment. Would it leave you in the original user's shell, or try to put you in root's login shell and thus not work?

I don't wanna mangle a machine to find out, but it might have worked. If I'm ever in that situation I'll definately try it.
# 6  
Old 04-23-2004
Hi


I dont have sudo installed... I tried to su *without the dash* but it tries to initiate a new shell (the root users default shell) and thus fails with the same NO SHELL error..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

2. Shell Programming and Scripting

Disk Monitoring shell script giving incorrect information

Hi All, OS: Linux 86x64 bits Red Hat Linux I get the email alert for the following when Alert condition is set for 30: /dev/sda1 99M 21M 74M 22% /boot -> Below 30%(Should not get the email alert) Expected output as per E-Mail alert: /dev/sda3 20G ... (2 Replies)
Discussion started by: a1_win
2 Replies

3. Shell Programming and Scripting

Shell script ,being root

It needs be root for some command and not for other commands. fdisk -l ls -l cd /etc For fdisk -l need root password. After fdisk -l i want to be again a normal user. How can i this with shell script? (4 Replies)
Discussion started by: cola
4 Replies

4. UNIX for Dummies Questions & Answers

Can you override root shell?

Hi, I'm trying to figure out the logic of my user shell and root shell :confused: This might be best illustrated with an example. If I log into the linux host I'm using and run the following: -bash-3.2$ which python /usr/local/bin/python I now run sudo bash to become root and run the... (2 Replies)
Discussion started by: cuchulainn
2 Replies

5. Red Hat

Root shell in /etc/passwd is corrupted

I accidentally changed root shell from /bin/bash to bash in /etc/password, then logged out from root. Now I can't login as root and got "No shell" error, although I have root password. "su -f -s /bin/bash" command does NOT work. There is no GUI interface for this system. My question: Do I have... (7 Replies)
Discussion started by: aixlover
7 Replies

6. Solaris

shell problem for root

hi i was just playing with my x86 machine with solaris10 on it what i hated was whenever i started my new terminal it started with sh shell so i changed it to bash by changing the last value in /etc/passwd to/sbin/bash and then i logged out and started again BBUT it said no login shell i... (8 Replies)
Discussion started by: tiwsaj
8 Replies

7. Solaris

Solaris 10 root shell change

Why does Solaris keep coming with bourne as the default root shell? I've spoken with numerous admins that tell me they change all the root shells to korn. I would like to change all Solaris 10 boxes here at my company to have a root korn shell. Can someone tell me why I shouldn't do this? ... (10 Replies)
Discussion started by: x96riley3
10 Replies

8. AIX

Can't login root account due to can't find root shell

Hi, yesterday, I changed root's shell in /etc/passwd, cause a mistake then I can not log in root account (can't find correct shell). I attempted to log in single-mode, however, it prompted for single-mode's password then I type root's password but still can not log in. I'm using AIX 5L version 5.2... (2 Replies)
Discussion started by: neikel
2 Replies

9. Solaris

changed shell of the root accidentally

Hi All, I have changed the shell of the root accidentally to /sbin/bash :mad: How do I change that? :( To change that I need to go to ok prompt I think, and there I need to mount the root file system in order to make changes to the respective file. Can any one please suggest how do I do... (4 Replies)
Discussion started by: pintu_asim
4 Replies

10. UNIX for Dummies Questions & Answers

Run non-root script as root with non-root environment

All, I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
Discussion started by: bubba112557
2 Replies
Login or Register to Ask a Question