Using Solaris pkg to list all setuid or setgid programs

Posted by darrenm on Oracle Blogs See other posts from Oracle Blogs or by darrenm
Published on Mon, 3 Dec 2012 13:56:25 +0000 Indexed on 2012/12/03 17:13 UTC
Read the original article Hit count: 488

Filed under:

$ pkg contents -a mode=4??? -a mode=2??? -t file -o pkg.name,path,mode

We can also add a package name on the end to restrict it to just that single package eg:

 
  

$ pkg contents -a mode=4??? -a mode=2??? -t file -o pkg.name,path,mode core-os

PKG.NAME       PATH                   MODE
system/core-os usr/bin/amd64/newtask  4555
system/core-os usr/bin/amd64/uptime   4555
system/core-os usr/bin/at             4755
system/core-os usr/bin/atq            4755
system/core-os usr/bin/atrm           4755
system/core-os usr/bin/crontab        4555
system/core-os usr/bin/mail           2511
system/core-os usr/bin/mailx          2511
system/core-os usr/bin/newgrp         4755
system/core-os usr/bin/pfedit         4755
system/core-os usr/bin/su             4555
system/core-os usr/bin/tip            4511
system/core-os usr/bin/write          2555
system/core-os usr/lib/utmp_update    4555
system/core-os usr/sbin/amd64/prtconf 2555
system/core-os usr/sbin/amd64/swap    2555
system/core-os usr/sbin/amd64/sysdef  2555
system/core-os usr/sbin/amd64/whodo   4555
system/core-os usr/sbin/prtdiag       2755
system/core-os usr/sbin/quota         4555
system/core-os usr/sbin/wall          2555


© Oracle Blogs or respective owner

Related posts about /General