Setting the default shell without using chsh


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Setting the default shell without using chsh

I have tcsh being set as the default shell.I would like to change to ksh.

But i dont have "chsh" on my solaris box.so i added the following code to my ~/.login file

Code:
if ( -f /usr/bin/ksh) then
setenv SHELL /usr/bin/ksh
exec /usr/bin/ksh
endif

But this helps me to get the ksh,i doesnot seems to execute ~/.profile & ~/.kshrc files.

Note : I have added the ENV=~/.kshrc;export ENV line to my ~/.profile.


Please provide me your suggestions.

Thanks
Nagarajan Ganesan
# 2  
What is your OS ? On Solaris for example you can use "passwd -e" - will change the shell.
# 3  
Changing the default shell

I use SCO Openserver 5, and when I create a new user, the OS creates
an entry in the file /etc/passwd, which states what the default shell is.

Read up on adduser, and the passwd file, if your OS is similar!
# 4  
Changing shell passwd -e

Hi All,
I tried to use passwd -e & ypasswd -e but it doesnot allows me to change the shell(Permission denied).

Adding the below code to ~/.login file (My default shell is /usr/bin/tcsh) helps to me to get the korn shell.

Code:
if ( -f /usr/bin/ksh) then
setenv SHELL /usr/bin/ksh
exec /usr/bin/ksh
endif

Quote:
Problem with this is it doesnot execute the ~/.profile.
Note: I don't have root access

Please provide in your thoughts.


Thanks in Advance,
Nagarajan G
# 5  
How to exec the shell.

HI All,
In my previous post i tried to exec the ksh,but it doesn't seems to execute the ~/.profile file.

Do we have any methods/options to exec so that we can tell the os to exec it as that of the login shell,thereby making the ksh to execute the ~/.profile .

Thanks
Nagarajan Ganesan
# 7  
Please refrain from bumping your posts the rules do not allow this.
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Redirect STDOUT and STDERR of chsh
austinharris43
EDIT: Nevermind, figured it out! Forgot to put backslashes in my perl script to not process literals! Hi everyone. I am trying to have this command pass silently. (no output) chsh -s /bin/sh news Currently it outputs. I've tried.... &> /dev/null 1> /dev/null 2>&1 /dev/null 1>&2...... Red Hat
1
Red Hat
Is this a shell setting problem?
duke0001
I have a question regarding shell settings. I have one Sun server with Solaris 9 and Oracle 10g R2 on it. DB is up running well. I created a script to start DB automatically when server reboot. It didn't work. I manually run dbstart under $ORACLE_HOME/bin, the server return message like:" dbstart:...... Shell Programming and Scripting
7
Shell Programming and Scripting
Setting value of Shell variable from within ISQL
tipsy
Hi Guys, Need help. I am using ISQL inside a shell script. Is there a way to set the value of shell script variable from inside the ISQL code. I do not want to write the results from the SQL to an output file. Please let me know. Regards, Tipsy.... Shell Programming and Scripting
3
Shell Programming and Scripting
Setting the shell
FredSmith
How can I make my default shell to be bash? I tried adding: /bin/bash to my .profile, but that had no effect. What did I do wrong? Thanks!... UNIX for Dummies Questions & Answers
3
UNIX for Dummies Questions & Answers
Setting up shell variables
rachael
Hi everyone, I am trying to set up the .profile for a user I have just created. In trying to set up the shell variables, I want to make the shell be korn shell (default shell i believe is Borne shell), so, this is what I did: SHELL=/usr/bin/ksh export SHELL Whenl executing the .profile,...... UNIX for Dummies Questions & Answers
1
UNIX for Dummies Questions & Answers