Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Solaris 8 -- How do I Change my Shell?

Status
Not open for further replies.

wpnetsystech

IS-IT--Management
Mar 12, 2002
4
0
0
US
Greetings,

I would like to change my current shell running on my SUN Ultra 5. I am running Solairs 8. I have attempted setting a new variable using the set command, but I have not been successful. Any assistance would be greatly appreciated.

Thank you,

wayne
 
Easiest way would be to edit the shell defined in /etc/passwd for your username (assuming it's not root!)

It will currently look someting like this ...

auser:x:1004:1002:A User:/home/auser:/bin/sh

change it to this (for ksh)

auser:x:1004:1002:A User:/home/auser:/bin/ksh

Greg.
 
Hang on a minute. Shouldn't that be /usr/bin/ksh?

I remember doing that once and had all kinds of problems in getting my system back and being able to login again - see other entries in this forum for similar tales of woe. Of course, things might be different in Solaris 8?
 
Sorry - ignore my last message.

It was /sbin/ksh I changed my shell to, not /bin/ksh.

Doh! :~/
 
Hang on a minute. Shouldn't that be /usr/bin/ksh?

Could be a fair point Ken ... on my box, /bin is a soft link to /usr/bin.

The only user to use sbin for the shell is root, which uses /sbin/sh. I don't have ksh or csh in /sbin. I assume this is in case mounting problems occur - at least sbin is on the root FS. Also explains why you should be careful when you change the root shell!

Greg.
 
When I change some thing in password, I immediately test it from root with &quot;su - <username>&quot;.
Do this before you logout!
 

Easiest way would be to use passwd command as root

# passwd -e <username>

Old Shell:/bin/sh
New Shell:

therefore; change the shell of the user !!!
.

Farah regal
good luck
&quot;think twice and hit enter once&quot;
 
Hi,

U can use either of these two methods for changing the shell of the user:-
1)usermod -s /usr/bin/ksh <username>
2)passwd -e <username>
Second option will show u old shell and ask u to enter the new shell parameter
But before using these options,make sure no one is logged in using that user-id when u make the changes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top