Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 489
  • Last Modified:

changing the default shell

Hi,


I'm trying to change the default shell in solaris CDE using
exec /usr/bin/tcsh in my .login file. It works in my terminal session, but CDE hangs at the solaris "welcome" logo when trying to login at the console.

Any idea?
0
aminat
Asked:
aminat
1 Solution
 
yuzhCommented:
If you want to change your default login shell, edit the
/etc/passwd file to make the change.

You need to verify if your have tcsh installed in your system before making the change.

If you don't have the super user power, ask your system adm to do it for you.

(you should change the .login file back to want it was !)

You can use "tcsh" (if you have it installed on your system) by type in command line command:

tcsh

Cheers!
0
 
OtetelisanuCommented:
You can change if you make:
ksh and have Kornshell or
csh , or sh
You can see with ps

Example:
root@pluto > ps
   PID TTY      TIME CMD
  7395 pts/5    0:00 ksh
  7816 pts/5    0:00 ps
root@pluto > sh
root@pluto > ps
   PID TTY      TIME CMD
  7818 pts/5    0:00 ps
  7395 pts/5    0:00 ksh
  7817 pts/5    0:00 sh
root@pluto > csh
pluto# ps
   PID TTY      TIME CMD
  7819 pts/5    0:00 csh
  7820 pts/5    0:00 ps
  7395 pts/5    0:00 ksh
  7817 pts/5    0:00 sh
pluto# exit
pluto# root@pluto > exit
root@pluto > ps
   PID TTY      TIME CMD
  7395 pts/5    0:00 ksh
  7821 pts/5    0:00 ps
root@pluto > 
0
 
wcheungCommented:
Depending on the particular naming service and security restrictions used on your system, it's sometimes possible for a regular user to change their default login shell using the one of the commands:

passwd -r files -e
passwd -r ldap -e
passwd -r nis -e
passwd -r nisplus -e

Some sites also have the old-style SunOS "chsh" command mapped to whatever Solaris equivalent of the above that should work for the particular system.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
bummerlordCommented:
You need to pass "-l" to tcsh if you wan't it to "act" as a login shell.
Put this _last_ in .profile

[ -x /usr/bin/tcsh ] && exec /usr/bin/tcsh -l

Since tcsh probably isn't statically linked and/or if you do this for the "root" user you will be greatful for the "test" clause when ever you may need/want to use the account in single user mode (e.g. when /usr may not be mounted). :-)

Be ware that your normal sh scripts might not work as expected (in the exec from .profile case that is), from cron for example, even though they look fine executed from the prompt. (Can probably be solved by enriching your scripts with the environment variables they may need)
I've seen this happen, but have not investigated further into why. Adding "complete" environment to the scritps executed from cron seem to help though. Just a hint if you notice odd behaviour that could be traced back to the change of shell.

/b
0
 
elf_binCommented:
Change it in /etc/passwd dude!
0
 
mdhmiCommented:

usermod -s (assuming you are using flat files)
Also verify that your new shell is defined in /etc/shells.

Mark
0
 
yuzhCommented:
I alread put /etc/passwd in my first comment !
0
 
liddlerCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by  wcheung

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now