I am wondering whether is it possible to log in in a computer with users like www-data or postgres as I do with my own user. Are some users "allowed to log in" while others not? Is there any difference between my own user and the ones created by programs like apache, postgres besides name? They got password?? As you may see I have lots of doubts, maybe you could recommend me some reading about this topic!

The question born when I was trying to create a new group and add new users to that group in Ubuntu 11.04 via the gnome GUI. I was able to create a new group "test" but the system only allowed me to add my user to that group and not the other users in the system like the ones that appear in /etc/passwd (I was running the Add Users/Group GUI with sudo privileges).

1 Answer 1


It is possible to disable (password) login into an account, using the -l option in passwd. That is how most of the system users, such as www-data and postgres in your examples, are set up.

  • Thanks for your answer... Ok, so I know now that users may not be able to login with password. I have read the adduser and useradd manpages and they say that the user can still log in with RSA keys for example. My question now is, www-data or other system users, login with this way?? Does it make sense if a user cannot login? How?
    – flyer88
    Commented Nov 1, 2011 at 20:03
  • Yes, system users can log in via key-pair ssh (no local token auth that I've heard of, but I suppose it could happen), but root would have to create the key pair and install it to the authorized_keys file. If you're asking why there can be (system) accounts that can't be logged into, it's because the processes that use those accounts can still be run as them (read about the suid bit).
    – Kevin
    Commented Nov 1, 2011 at 20:40
  • 1
    @flyer88: If you're worried about these users logging in, another small step is to check that their shell in /etc/passwd is something that doesn't give them a shell. Usual choices for this are /sbin/nologin or /bin/false. Commented Nov 2, 2011 at 6:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .