Changing the login shell for a user

From SynologyWiki
Jump to: navigation, search

Changing the login shell for a user

If you experience an error like:

su: cannot run /sbin/nologin: No such file or directory

when you try to do

su some_user

you have to change the login shell for that user.

Notice: You should be sure about using vi properly before doing this.

This is done with the following line:

vi /etc/passwd

You'll see a line like this:

some_user:x:1025:100:Descriptive text:/nonexist:/sbin/nologin

Change that line to:

some_user:x:1025:100:Descriptive text:/nonexist:/bin/ash

Save the file, and you're done. You're now able to do

su some_user
Personal tools
Community Resources