Changing default login shell


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Changing default login shell
# 1  
Old 07-13-2009
Changing default login shell

Hi everybody,

The problem is quite simple, I want to change my default shell which is /bin/csh to /bin/bash. I have looked online for solutions to my problem, but to no avail.

I have tried chsh, but it tells me this:

chsh: can only change local entries; use ypchsh instead.

I use ypchsh, but I get:

ypchsh: can't get local yp domain: Local domain name not set

I looked at /etc/passwd, and I don't have an entry in this file.

However when I do, getent passwd d.tang

d.tang:x:10948:20004:Dave Tang:/home/d.tang:/bin/csh

I don't have root privileges, but even if I did I don't even know where this information is coming from.

Could someone shed some light on this?

Many thanks,

Dave

PS Currently I just setup .cshrc to say /bin/bash and when that changes my .bashrc and .bash_profile are loaded.

Last edited by z1dane; 07-13-2009 at 10:50 PM.. Reason: disabled smilies as it interfered with text
# 2  
Old 07-14-2009
since you have tried chsh, may be chfn, chpass can help, though I am not sure.
# 3  
Old 07-14-2009
Thanks for the reply rakeshawasthi. I don't have the chpass program and I don't know if I can use chfn to change my default login shell.

man chfn

NAME
chfn - change your finger information

SYNOPSIS
chfn [ -f full-name ] [ -o office ] [ -p office-phone ] [ -h home-
phone ] [ -u ] [ -v ] [ username ]
# 4  
Old 07-15-2009
Quote:
PS Currently I just setup .cshrc to say /bin/bash and when that changes my .bashrc and .bash_profile are loaded.
You seem to have solved the problem already.
A root user can change your default shell easily.
The "csh" is rarely used nowadays.
# 5  
Old 07-15-2009
Hi methyl, thanks for the reply and yes I have solved the problem.

However I was interested to see where the information for my default shell is stored. It isn't in /etc/passwd. Is there some way of finding out i.e. finding out where getent passwd d.tang gets its information from?
# 6  
Old 09-17-2009
The solution to this was to contact my system admin, who just changed the global passwd file (which I still don't know where it resides) that my account was reading.
# 7  
Old 09-17-2009
please post the output of

Code:
grep passwd /etc/nsswitch.conf

my guess is LDAP.
This User Gave Thanks to frank_rizzo For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script as login shell (passing args to login shell)

Hello all, for security reasons my compagny imposes that my script be launch remotly via ssh under the users login shell. So serverA launches the ssh command to serverB which has a local user with my script as a login shell. Local script works like a charm on his own. serverB$ grep... (20 Replies)
Discussion started by: maverick72
20 Replies

2. HP-UX

Changing default shell to bash

According to multiple sources you should not change the default shell to bash for the root user because it will make the system unbootable. Is there a safe way to launch bash for root when logging in? Perhaps I can edit /etc/profile or add it to a startup script somewhere? (2 Replies)
Discussion started by: bstring
2 Replies

3. Post Here to Contact Site Administrators and Moderators

Changing login details

Dear Administrators! I would like to change my username for this forum, would it be possible? Regards FR (1 Reply)
Discussion started by: fretagi
1 Replies

4. Shell Programming and Scripting

Changing the Login Path

Hi frnds! i m installing a software named 'Gamit' by using bash. bt i recieved the follwoing error: .. removing any existing Makefiles or archive files from libraries directories /root/Documents/ISP/Gamit_10.4/com/rmfresh: Permission denied. .. removing any existing Makefiles or... (1 Reply)
Discussion started by: Engr. Shoaib
1 Replies

5. HP-UX

Changing the default login directory of a user

I want to change the default login directory of a user from /home/user to a new directory. how can i do this? thanks in advance....:) (1 Reply)
Discussion started by: smahe23
1 Replies

6. Shell Programming and Scripting

How to change your default login shell.

I am new to UNIX hence the question. Most of the time when I have an environment set up for me to develop my systems, I have had my ID logon and I can edit the .profile for my account and it understand commands korn shell. It seems this machine, a new SUN machine, was setup with users getting the... (3 Replies)
Discussion started by: klarue7
3 Replies

7. OS X (Apple)

Changing Default Shell

I bought a used MacBook G4 with Tiger 10.4.11 Running fine, then I noticed a few things were missing. I don't have Terminal or Netinfo Manager in my Utilities! I downloaded iTerm, but for some reason my shell is set to /dev/null I know I can change my shell using Netinfo Manager, but I don't... (5 Replies)
Discussion started by: Ricardo-san
5 Replies

8. HP-UX

cannot login after changing login shell

Hello Everyone, I am a newbie in unix. I was practicing shell scripts on hp unix machine. I changed my current login shell (Korn) to Bourne shell giving the following command. $ chsh username /usr/bash I am using secure shell client for accessing the hp ux server. After which i... (4 Replies)
Discussion started by: hardesh
4 Replies

9. UNIX for Dummies Questions & Answers

changing login prompt on redhat

Hi... Can anyone help! I am in dire need to change the "login:" prompt to "username:" any ideas? Thanks in advance :) (6 Replies)
Discussion started by: juilan
6 Replies
Login or Register to Ask a Question