In order to change shell for a particular user of Unix/Linux system without editing /etc/passwd file manually just use command:

chsh -s /path/to/shell username

for example, to change shell to ‘sh’ from ‘bash’ for user ‘viper’, use command:

chsh -s /bin/sh viper

 

4 Comments

 

  1. August 9, 2008  1:27 pm by Wouter den Dulk Reply

    Hi,

    One can also sudo vim /etc/passwd

    and change the shell column from sh to bash

    or anything else and then :wq

  2. Pingback : Quick shell change for user in Unix or Linux « Linux Admin Blog

  3. May 8, 2011  8:56 am by Rob Rasner IMDB Reply

    Sup we found this Quick shell change for user in Unix or Linux - Linux * Screw entry very worthwhile and so we have included an trackback to it on our web site, keep up the great work:) All the best ... Rob Rasner IMDB

  4. March 30, 2012  7:11 pm by fruit mocking party Reply

    Howdy! This is kind of off topic but I need some advice from an established blog. Is it difficult to set up your own blog? I'm not very techincal but I can figure things out pretty quick. I'm thinking about making my own but I'm not sure where to begin. Do you have any points or suggestions? Many thanks

Leave a reply

 

Your email address will not be published.