# # chsh
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

2003/12/27 chsh

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© December 2003 Tony Lawrence

Change your login shell. What shell you like is a matter of personal preference. I can argue that if you have no preference, you should be using bash (or ksh if bash isn't available), but if you have a lifetime of experience with csh or tcsh syntax, that's what you are going to want, and chsh will do it.

Generally speaking, DON'T CHANGE root's shell. I use to see this fairly often: some SunOS person would be hired to do some work on a SCO machine. Because SunOS historically used csh, using sh was of course very painful for them, so they'd change root's shell to csh. No problem, at least until the machine rebooted. Then all hell broke loose, because the csh didn't undertand how to run the /bin/sh initialization scripts.

Nowadays, the scripts would probably begin with #!/bin/sh and that would have been less painful, but it's still a better idea to leave things as the designers expected. Nothing stops you from just typing "bash" or "csh" after you login, and that's a far safer way of conducting your business.

Chsh is also used by admins to lockout users:

chsh -s /bin/true edward
 

locks edward out of the system for now without changing anything else about his account. If you really need to worry about Ed, you'd also move his home directory: "mv /home/edward /home/edward.locked" (which prevents him from possibly doing things with ssh that don't involve an actual shell, like forwarding ports).


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> chsh


Inexpensive and informative Apple related e-books:

Digital Sharing Crash Course

Take Control of IOS 11

Photos: A Take Control Crash Course

Take Control of OS X Server

Take Control of Upgrading to El Capitan





More Articles by © Tony Lawrence





Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





One day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" (Larry Wall)




Linux posts

Troubleshooting posts


This post tagged:

Scripting

Shell

UnixWords



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode