?
Solved

changing the default shell

Posted on 2003-03-06
9
Medium Priority
?
486 Views
Last Modified: 2013-12-27
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
Comment
Question by:aminat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 8086137
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
 
LVL 4

Expert Comment

by:Otetelisanu
ID: 8086657
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
 
LVL 1

Accepted Solution

by:
wcheung earned 300 total points
ID: 8095584
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
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 6

Expert Comment

by:bummerlord
ID: 8099265
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
 
LVL 10

Expert Comment

by:elf_bin
ID: 8101851
Change it in /etc/passwd dude!
0
 
LVL 1

Expert Comment

by:mdhmi
ID: 8141151

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

Mark
0
 
LVL 38

Expert Comment

by:yuzh
ID: 8142391
I alread put /etc/passwd in my first comment !
0
 
LVL 18

Expert Comment

by:liddler
ID: 10475122
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question