Quick shell change for user in Unix or Linux

Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.

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

 
 
» You might also be interested in the following articles:
Local and remote X sessions on different consoles
Can’t find usable shell script encryption solution…
Why use SUDO instead of SU?
Secure shell (ssh) session timeout
Two-way conversion of Unix time (seconds since 1970) and regular time



» Want to stay up to date? Subscribe to our E-MAIL or RSS feed!

2 Responses to “Quick shell change for user in Unix or Linux”


  1. 1 Wouter den Dulk

    Hi,
    One can also sudo vim /etc/passwd
    and change the shell column from sh to bash
    or anything else and then :wq

  1. 1 Quick shell change for user in Unix or Linux « Linux Admin Blog

Leave a Reply




Friendly Sites:Who is behind Linux Screw?
GeekyBits³ | Bash Cures Cancer | OMG! Ubuntu!
My SysAd Blog | Web Upd8
ZEPY | Linux config Wiki | Planet Sysadmin
a non-geek's linux notes | Linux Today
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem N. (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››