- SSH uses usernames & passwords for authentication/authorization.
- The NFS server uses IP addresses for mounting authentication/authorization and the user id when individual files are used (the regular Unix permissions are used). Also it can use other methods, like Kerberos. Anyway the idea is that mounting authorization is done per machine, not per user.
- Samba uses usernames & passwords for mounting most of the time (
security = user) and I think that CIFS also supports using UIDs when accessing individual files just like NFS. The usernames & passwords are usually stored in a file called
passdb.tdb, not in
passwd doesn't change the password of a Samba user.
- X uses IP addresses for authentication/authorization or cookies.
As you can see, there's no easy way to enable/disable access to these services for a specific user.
LE: A couple of network services including RPC (used by NFS) and SSH, use the *hosts_access* mechanism (
man hosts_access) for host based authentication/authorization. You'll need to edit
/etc/hosts.deny for this. Compared to iptables, the advantage is that you don't need to know the ports of the services, but not all services support this mechanism. Paranoid people would use both :-)
LE2: *hosts_access* supports usernames too, but AFAIK this is insecure.