I work on a shared linux enviroment (CentOS), but for some reason one of my logins has been locked. When I do a cat /etc/passwd | grep "/home", I can find my user:


I've got root permission, but don't know what to do to be able to login again.

What should I do about this 'no login' thing??


man 8 nologin There is your real answer as to why it isn't working.

If you want the user to log in then you need to give them a shell like /bin/bash or something else.

You can edit /etc/passwd directly or use usermod -s /bin/bash roaming, all of this needs to be done as root.

  • I'm really new to linux, so please don't kill me for my noob question: While in the root, I've tried the command but the output was: [root@nagioserver01 ~]# usermod roaming -s /bin/bash usermod : user /bin/bash does not exist
    – ZeldaElf
    Nov 24 '14 at 13:30
  • @ZeldaElf Sorry about that, I had the order mixed. Put the username last, the post has been updated.
    – SailorCire
    Nov 24 '14 at 13:30
  • Just to understand: What did you mean by "giving them a shell"?
    – ZeldaElf
    Nov 24 '14 at 13:33
  • Well, a user needs some sort of shell to interact with the system, from a webserver program to the person sitting in a chair they all need a shell. nologin is used when an account is disabled or when they shouldn't have a shell that they can interact with.
    – SailorCire
    Nov 24 '14 at 13:37
  • @ZeldaElf by the way, if you are happy with the answer I've provided, please mark it as accepted.
    – SailorCire
    Nov 24 '14 at 17:32

If you have root, try

chsh --shell /bin/bash raoming 


  • chsh : change shell
  • --shell /bin/bash tel to use /bin/bash
  • roaming : your user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.