Jump to content

Change a user Login Shell

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Guest_Wanch_*

Guest_Wanch_*
  • Guests
What is the command to change a users login shell?

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
You can use 'chsh' for this purpose.

$ chsh -s <shell> <username>

You can also use chsh without the -s and it will enter into interactive mode. If you are trying to disable a login use the nologin shell:

$ chsh -s /sbin/nologin

The above command is great for disabling SSH access to a server.

#3
Tor

Tor

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 486 posts
You can also use /dev/null but it is not as friendly. I think it only shows a permission denied error.

What does /sbin/nologin do?