Quick shell change for user in Unix or Linux

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
Why use SUDO instead of SU?
Can’t find usable shell script encryption solution…
Quick copy/paste MySQL Replication Manual
Secure shell (ssh) session timeout



» 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?
Aspiring Sysadmin | GeekyBits³ | Bash Cures Cancer | TOTMS
Linux Operating System | Small Linux Deployments | My SysAd Blog
The Danesh Project | ZEPY | Linux config Wiki | Planet Sysadmin
The Sys Admin | {buhay sysad} | a non-geek's linux notes
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem Nosulchik (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 ››