Create a Remote (ONLY) user?

I want to create a user on my opensuse 11.4 computer, for the sole purpuse of using it to access network shared data (eg samba, nfs, etc).
This user must be in the “Users” group, but it must NOT be able to login directly on the computer, i dont want him to show up on the GDM users list at logon, he must not be able to login to a terminal, etc.

How can i add a user like that? must he belong to a specific group?

thanks

If you don’t want a user to appear in the GDM users list, give him a system UID, comprised between these two values:

awk '/^SYSTEM_UID_MIN|^SYSTEM_UID_MAX/ { print $2 }' /etc/login.defs

But look in /etc/passwd if it’s not already used.

If you don’t want a user to login, change its login shell to /sbin/nologin:


usermod -s /sbin/nologin Fred

A user who’s not allowed to login might still be able to mount samba shares. I’m not sure. You have to try.
It’s unclear to me what you want to do with nfs.

Yes, I just checked.

ahh! i knew about giving the user the nologin shell, but i dint know his UID had to be in a specific range (thats why it kept showing up on the GDM user list).
Thank you very much.

On 2011-06-28 23:36, ErnestoRD wrote:
> but i dint know his
> UID had to be in a specific range

That’s a hack, a trick, because GDM lacks a feature.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)