$ whatis pcred

The set of commands that work on proc (psudo) based file systems. The list of ptools are: proc, pflags, pcred, pldd, psig, pstack, pfiles, pwdx, pstop, prun, pwait, ptime - proc tools


Examples:

	
# hostname
MySolaris

# id
uid=0(root) gid=0(root) groups=0(root),1(other),2(bin),3(sys),4(adm),5(uucp),6(mail),7(tty),8(lp),9(nuucp),12(daemon)

# pcred -l root
usage:  pcred [-a] { pid | core } ...
        pcred [-u user] [-g group] [-G groups] pid ...
        pcred -l login pid ...
  (report or modify process credentials)

# pcred 1
1:      e/r/suid=0  e/r/sgid=0

# pcred $$
26216:  e/r/suid=0  e/r/sgid=0
        groups: 0 1 2 3 4 5 6 7 8 9 12

# echo $$
26216

# pcred 26216
26216:  e/r/suid=0  e/r/sgid=0
        groups: 0 1 2 3 4 5 6 7 8 9 12

# pcred 1
1:      e/r/suid=0  e/r/sgid=0

# ps -ef | grep -i http
webservd 23257  9839   0 16:03:48 ?           0:00 /usr/apache2/2.2/bin/httpd -k start
webservd 23259  9839   0 16:03:49 ?           0:00 /usr/apache2/2.2/bin/httpd -k start
webservd  9845  9839   0   Sep 28 ?           0:00 /usr/apache2/2.2/bin/httpd -k start
webservd  9840  9839   0   Sep 28 ?           0:12 /usr/apache2/2.2/bin/httpd -k start
webservd 10308  9839   0   Sep 28 ?           0:00 /usr/apache2/2.2/bin/httpd -k start
webservd  9841  9839   0   Sep 28 ?           0:00 /usr/apache2/2.2/bin/httpd -k start
    root  9839     1   0   Sep 28 ?           0:23 /usr/apache2/2.2/bin/httpd -k start
webservd 25866  9839   0 00:30:24 ?           0:00 /usr/apache2/2.2/bin/httpd -k start
webservd 10307  9839   0   Sep 28 ?           0:00 /usr/apache2/2.2/bin/httpd -k start
webservd 10309  9839   0   Sep 28 ?           0:00 /usr/apache2/2.2/bin/httpd -k start
webservd 23258  9839   0 16:03:49 ?           0:00 /usr/apache2/2.2/bin/httpd -k start
webservd 10310  9839   0   Sep 28 ?           0:00 /usr/apache2/2.2/bin/httpd -k start

# pcred 29839
9839:   e/r/suid=0  e/r/sgid=0

# pcred 9839
9839:   e/r/suid=0  e/r/sgid=0

Please click on " man pcred. " to see the Manual Page for this command.