Sponsored Content
Top Forums UNIX for Advanced & Expert Users Setting the default shell without using chsh Post 302119507 by ennstate on Wednesday 30th of May 2007 08:18:47 AM
Old 05-30-2007
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
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Setting up shell variables

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,... (1 Reply)
Discussion started by: rachael
1 Replies

2. UNIX for Dummies Questions & Answers

Setting the shell

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! (3 Replies)
Discussion started by: FredSmith
3 Replies

3. Shell Programming and Scripting

Setting value of Shell variable from within ISQL

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. (3 Replies)
Discussion started by: tipsy
3 Replies

4. Shell Programming and Scripting

Is this a shell setting problem?

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:... (7 Replies)
Discussion started by: duke0001
7 Replies

5. Shell Programming and Scripting

[PHP] Setting a Superglobal from the Shell ?

Hey, Does anyone know if it is possible to set a PHP Superglobal variable (in an Apache2 working environment) from the shell or command line? I tried to set one like this by creating a file env.php with this: <?php $_ENV = 'YEAME'; ?> And I executed as root with: php env.php ... (0 Replies)
Discussion started by: Neo
0 Replies

6. Shell Programming and Scripting

setting a path in bash shell

Hello all, Sorry if the question if stupid but I have no big experience with programming. I am trying to set a path to be used in a makefile.in, for installation of a Fortran code. The makefile.in contains the string $(CODE_NAME) Now, when I type in the bash shell export... (6 Replies)
Discussion started by: laura74
6 Replies

7. Shell Programming and Scripting

Probelm setting a variable to $* in C Shell

Trying to put all command line arguments to the script in a variable msgst01 $* does not seem to work set msgst01 = $* (2 Replies)
Discussion started by: kristinu
2 Replies

8. Red Hat

Redirect STDOUT and STDERR of chsh

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... (1 Reply)
Discussion started by: austinharris43
1 Replies

9. Shell Programming and Scripting

tcsh env setting using shell script

Hi All, I have made a file file usercreate.sh & it has to run in tcsh env & needs some path to be set. my script is as below. ########################## #!/bin/csh setenv PATH "/usr/lib/java/class" setenv LD_LIBRARAY_PATH ########################### but when i am ruuning my script... (1 Reply)
Discussion started by: ajaincv
1 Replies

10. UNIX for Advanced & Expert Users

Setting permissions for shell scripts

Hi, I have written a shell script which calls a java program which reads properties from a configuration file and writes to a log file for each session.However the customer wants that the user should not be able to open/edit the configuration file or the log files meaning they should not... (4 Replies)
Discussion started by: jayadrath
4 Replies
CHSH(1)                                                            User Commands                                                           CHSH(1)

NAME
chsh - change login shell SYNOPSIS
chsh [options] [LOGIN] DESCRIPTION
The chsh command changes the user login shell. This determines the name of the user's initial login command. A normal user may only change the login shell for her own account; the superuser may change the login shell for any account. OPTIONS
The options which apply to the chsh command are: -h, --help Display help message and exit. -R, --root CHROOT_DIR Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory. -s, --shell SHELL The name of the user's new login shell. Setting this field to blank causes the system to select the default login shell. If the -s option is not selected, chsh operates in an interactive fashion, prompting the user with the current login shell. Enter the new value to change the shell, or leave the line blank to use the current one. The current shell is displayed between a pair of [ ] marks. NOTE
The only restriction placed on the login shell is that the command name must be listed in /etc/shells, unless the invoker is the superuser, and then any value may be added. An account with a restricted login shell may not change her login shell. For this reason, placing /bin/rsh in /etc/shells is discouraged since accidentally changing to a restricted shell would prevent the user from ever changing her login shell back to its original value. FILES
/etc/passwd User account information. /etc/shells List of valid login shells. /etc/login.defs Shadow password suite configuration. SEE ALSO
chfn(1), login.defs(5), passwd(5). shadow-utils 4.5 01/25/2018 CHSH(1)
All times are GMT -4. The time now is 10:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy