Get a list of users with access to the host
Solution 1
It's likely that
- the list of users come from a network service: probably LDAP, maybe NIS if the network has been around for a very long time;
- the home directories are automounted, i.e. mounted from some file server when the user logs in.
The file /etc/nsswitch.conf
defines what sources provide user lists (the passwd
setting).
The Solaris commands listusers
and login
show the list of users. It's possible that not all these users are allowed to log in on this particular machine. Finding out exactly which users are allowed to log in where may require digging deeper in the user databases and in the PAM configuration.
Solution 2
If you don't have read access to /var/adm/wtmpx
or the last
command on the file server, there aren't many built-in ways to see all users on the system. Also, user accounts may be stored elsewhere such as a directory server.
However, it sounds like you are in a terminal environment. Your home directory is probably mounted as /home/yourname
, where /home
is a directory on your local host, and yourname
is a directory on the remote host. The methods mentioned above will not show any network users, and ls /home
will only return any directories you can read in the local host's /home
directory. The remote host's user directories will not be exposed in any case in this scenario. This is by design, as Solaris and *nix are multi-user operating systems designed to grant or limit privileges and control access on a per-user level.
Related videos on Youtube
Comments
-
amphibient over 1 year
I tried to go into
/home
and list all the subdirectories but it seems that all dirs that are not mine are hidden. I also triedcat /etc/passwd
but that didn't list my very own ID I was logged in under. I should also note that my home dir is not physically located on the host but on another network server that hosts everybody's home directories, which are then mounted to all the machines that they have access to. So while dirs like /opt, /var, /etc and so on are physically located on that particular machine, the home dir is on another server.As a non-root user, is there a way for me to see who all has access to a certain host? OS is Solaris 5.10.
-
llua over 11 yearssounds like a lack of permissions some sysadmin intended.
-
-
amphibient over 11 years
listusers
worked, thanks. Do you know what the equivalent of it is in Linux? -
Gilles 'SO- stop being evil' over 11 years@foampile
getent passwd