How do I change my shell?
Last updated July 6, 2011
I tried but chsh isn’t working (says I’m not in /etc/passwd)
That’s because chsh only works on entries in /etc/passwd, and all of our real-person accounts (yours, mine, the dean’s, …) are in NIS (as are a number of our service accounts).
You need to use ypchsh to change your NIS shell.
If that doesn’t work, or if the change doesn’t persist, mail systems and let us know what you’d like your shell changed to, and we can make the change in a way that will stick.
Note that:
- ypchsh does not affect any running login sessions (these continue to use whatever your shell was at time of login). In order for the change to take effect on any running sessions, you have to log out of back into those sessions.
- CCIS linux boxes cache NIS passwd lookup information (including shell) for a certain period of time (as of July 2011: 10 minutes). A cache-invoking lookup can be caused by logging in, or simply by querying the system for your passwd entry. As such, the system on which you run ypchsh likely will not check in to discover your new shell until ~10 minutes after you have changed it. If you want to immediately confirm your shell change, it is best to change your shell on one machine and then connect to another machine which you have not recently accessed to confirm that the change took effect. See Linux at CCIS for a list of machines which are available for general use.
You must log in to post a comment.