Solaris managing users – Gathering more information

Now I am learning user administration under Solaris. Here is what so far I had learned. Solaris use /etc/passwd, /etc/group and /etc/shadow file to store user names and password information. I have also noticed that /etc/oshadow file, which is a temporary file used by passwd, passmgmt and pwconv to update the real shadow file.

To print all system account you need to use awk command:

$ awk -F: awk -F: ‘ $3 ≤ 99 { print $0 }’ /etc/passwd

OR to just display list of all regular user:

$ awk -F: ‘ $3 > 99 { print $0 }’ /etc/passwd

  • IDs 0-99 are for Solaris system accounts
  • IDs 100-999 for applications
  • IDs 1000-60000 for normal users

Solaris also support id command to list user UID and GID:

$ id

uid=1000(rock) gid=1(other)

To list user name, user ID and all the groups to which the user belongs you need to pass -a option to id command:

$ id -a

uid=1000(rock) gid=1(other) groups=1(other), 3(sys),4(adm), 100(wwwftp)

List user and system login information:
This command displays information on user and system logins known to the system.

# logins

Getting more information about users
Find out who is on the system

$ who

Display information about currently logged-in users and what they are doing

$ w

Find out who is doing what (just like w command)

$ whodo

Dispaly user’s login name:

$ logname
$ echo $LOGNAME

Try out who command (fun):

$ who am i
$ who r u
$ who 1 2
$ who we are
$ who the hell you are

Find out shell you are using:

$ ps -p $$

Display more information about user such as:

$ finger rockyjr


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 3 comments so far... add one


CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
3 comments… add one
  • Remus May 11, 2009 @ 8:29

    How to check for deactivated accounts? There is no chage -l user on solaris.

  • Halim Jul 3, 2011 @ 10:49

    very nice , keep it up .

  • ANILKUMAR Jun 23, 2012 @ 10:52

    very nice , keep it up .

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum