changed shell of the root accidentally


 
Thread Tools Search this Thread
Operating Systems Solaris changed shell of the root accidentally
# 1  
Old 02-19-2005
Question changed shell of the root accidentally

Hi All,
I have changed the shell of the root accidentally to /sbin/bash Smilie
How do I change that? Smilie
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 that? Give me details of the procedure how to do the same.

-Asim
# 2  
Old 02-19-2005
This will be very similiar to recovering from a lost root password. Read the "lost root password" article in our FAQ section.
# 3  
Old 02-19-2005
I am assuming you are unable to login in to the box.

If the OS is running, type:
df -k /

There should be an entry that looks like: /dev/dsk/c0t0d0s0

Write this down.

If it is /dev/vx/dsk/<something>, this is a little more complicated.

If it is /dev/md/d<some number>, again a little more complicated.

Put a Solaris install CD in the CDROM.

From the ok prompt (press stop and A to get there) type:
boot cdrom -s

Once the box has booted from CD, it will give you a root prompt. You need to mount the root file system.
# mkdir /tmp/a
mount /dev/dsk/<c?t?d?s? from above> /tmp/a
cd /tmp/a/etc
vi passwd

Change the root shell to /sbin/sh

Then:
cd /
umount /tmp/a
reboot

If you like using bash, which I do, then the first thing you type after the root password is always: bash

I have bash aliased in the root profile to exec bash so I don't have to walk back through the shells when logging out.
# 4  
Old 02-21-2005
hi,
thanks for the reply.
actually I'm facing problem in goin' to ok prompt.
i have to go to the console through a tc and a normal key board.
what i did was manually rebooted it and then ctrl + ]
a telnet prompt came, there i typed send break...but all was fruit less Smilie
what to do?

-Asim
# 5  
Old 02-22-2005
What program are you using to access your terminal server? and spacifically what keys are you pressing to send your ctrl break?



William
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Root password changed but old one still works

Hello i am running AIX 6.1. i recently changed the root password using passwd and pwdadm. while the new password works fine, i am still able to login using the old password. is there anyway this can disabled\fixed thanks (5 Replies)
Discussion started by: dnlsingh
5 Replies

2. Red Hat

Accidentally changed ownership-unable to SSH into server.

Hi All, Accidentally changed ownership of /var directory as root :eek: thinking that I am changing ownership of var directory in other location in the file system:D.Now unable to SSH into the server:(. By gods grace I was able to regain the access again as server was in control of me at that... (5 Replies)
Discussion started by: shiek.kaleem
5 Replies

3. Shell Programming and Scripting

Script to echo "File permissions or ownership changed from required " when accidentally changed.

Hi All, I have to work in the late nights some times for server maintenance and in a hurry to complete I am accidentally changing ownership or permission of directories :( which have similar names ( /var in root and var of some other directory ).:confused: Can some one suggest me with the... (1 Reply)
Discussion started by: shiek.kaleem
1 Replies

4. UNIX for Dummies Questions & Answers

Root user changed language display

Hi, I was carrying out some simple admin tasks setting up a user, logged in as root when I fumbled on the keyboard. It appears I typed cp * ../user/<esc><esc>I hit return and now the display has set to a strange array of symbols e.g. ¼Ùïõò §ÏÅÎÓÓȧ ãïîîåãôéïî èáó ôåòíéîáôåä I've tried looking at the... (7 Replies)
Discussion started by: becky492
7 Replies

5. Emergency UNIX and Linux Support

Accidentally Changed File Ownership to Include a "Comment" [AIX]

Hi. I've had a little mishap. To cut a long story short, I've accidentally recursively ran chown on a directory (actually a bunch of 'em). Not a problem in itself, but I had a slight error in the code I used to get the list of directories and ended up with a comment in the file ownership. ... (15 Replies)
Discussion started by: Scott
15 Replies

6. UNIX for Advanced & Expert Users

SuSE-11 Ownership of files having root got changed

Hi Experts, I have create a new user with uid and gid as 0 in SuSE-11 Server. After that all the files having root owner ship are showing as new user name as owner. If I login as root, and type 'id' command, it also shows the new user. Sample output from my server. host:~ # id uid=0(test)... (4 Replies)
Discussion started by: vipinable
4 Replies

7. OS X (Apple)

I accidentally changed to only write permission on /usr/bin... please Help!

I accidentally changed to sudo chmod a=w to my /usr/bin folder on my macbook with OS 10.5.8... Please help! I can't even get into a terminal correctly cause it displays: -bash: uname: command not found -bash: cut: command not found -bash: uname: command not found -bash: cut: command not found... (6 Replies)
Discussion started by: scaryMac23
6 Replies

8. Solaris

what impact root gid changed from other to root is?

> id root 0(root) 1(other) From CIS scanning result"it should make sure the root's gid is equal to 0", so I don't know what's the impact for that change to whole system? BTW, why is there a group named other under solaris? what does group "other" do ? Thanks very much! (3 Replies)
Discussion started by: a2156z
3 Replies

9. 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

10. SuSE

root folders group changed in SUSE linux

The group of the /root folder has been changed and then logged out I am not able to log in to the /root user as it is saying Xsession log in not allowed Is there any way that the group of the /root folder be changed? (1 Reply)
Discussion started by: napster_san
1 Replies
Login or Register to Ask a Question