Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Root Users 2

Status
Not open for further replies.

copperslim

Technical User
Dec 13, 2002
101
0
0
GB
With out using smitty is there any command/s or script I can use to determine which user/s has root privilege on my system
 
That was really help full but now i need to know from where i can find all UIDs and which group it is linked to.
Thanks
Unixer
 
You can use [tt]lsuser[/tt] and/or [tt]lsgroup[/tt] to do that.
I hope it works...
Unix was made by and for smart people.
 

lsuser -a groups ALL

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
I have written a small script (pass.sh) to find out those users and direct the output into a file:
#!/bin/ksh
#==============================================================
# Script pass.sh created to list persons who has userid=0
# Creator: Kimmers
# Date: 09/07/02
# Version: 0.0.1
# 0.1.0
# 1.0.0
# 1.1.0 04/09/02 Added to include the /etc/passwd-line
# And send the output to a file
#===============================================================


for i in `lsuser -a id ALL |grep "id=0" |awk '{print $1}'`
do
grep -w $i /etc/passwd >> /tmp/userid_0.txt
done
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top