Identify root like user.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Identify root like user.
# 1  
Old 03-04-2009
Identify root like user.

Hi All,
I wanted to know if there is any way , in which a user could be identified. I need to diffrenciate between a root user and a root like user.

Thanks!
nua7
# 2  
Old 03-04-2009
There are number of approaches you can use, what's your OS, preferred language ?
# 3  
Old 03-04-2009
I'm a beginner but i think if you print out the variable user, it give the user wich is connect
example: echo $USER
# 4  
Old 03-04-2009
Code:
id|cut -d\( -f2|cut -d\) -f1

# 5  
Old 03-05-2009
Yes, many approaches, and if you use LDAP ...
Well, try this ?
Code:
 cat /etc/passwd | cut -d: -f1,3,4 | grep 0:0$

All users uid=0 and groupid=0 are root clones.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to identify user?

Hi Team I have created some time back a user called "iuser" but I am not able to login with it. I am getting below error. # su - iuser su: user iuser does not exist tried to unlock the user still get same error # pam_tally2 -u iuser -r pam_tally2: pam_get_uid; no such user iuser... (7 Replies)
Discussion started by: scriptor
7 Replies

2. UNIX for Dummies Questions & Answers

Switching from root to normal user takes me to user's home dir

Whenever i switch from root to another user, by doing su - user, it takes me to home directory of user. This is very annoying as i want to be in same dir to run different commands as root sometimes and sometimes as normal user. How to fix this? (1 Reply)
Discussion started by: syncmaster
1 Replies

3. Shell Programming and Scripting

How to give root access to non root user?

Currently in my system Red Hat is installed. And Many user connect to my machine via SSH Techia Terminal. I want to give some users a root level access. Can anyone please help me how to make it possible. I too searched on the Google but didn't find the correct way Regards ADI (4 Replies)
Discussion started by: adisky123
4 Replies

4. UNIX for Advanced & Expert Users

Root and non-root user not able to delete the file

Hi!! one strange problem occurred with my RHEL 5 box. i'm having logs folder with ownership of non-root user. Created some files with root user under logs folder. here is the scene: -rw-r----- 1 root root 1048227 Feb 28 12:34 SystemOut_13.02.28_12.34.10.log -rw-r----- 1 root root ... (6 Replies)
Discussion started by: sukhdip
6 Replies

5. UNIX for Dummies Questions & Answers

Sudo to delegate permission from non-root user to another non-root user

I've been through many threads before i decide to create a separate thread. I can't really find the solution to my (simple) problem. Here's what I'm trying to achieve: As "canar" user I want to run a command, let's say "/opt/ocaml/bin/ocaml" as "duck" user. The only to achieve this is to... (1 Reply)
Discussion started by: canar
1 Replies

6. Cybersecurity

Please help identify these user account

Please help me identify these user accounts.. bin, lp, nuucp, smbnull, mysql, tftp Can we remove these user or disable these users?We have to apply the security policy about the user identification.Since it was settup by our vendor long time ago. We do not have these informations about these... (3 Replies)
Discussion started by: rdstkg
3 Replies

7. AIX

Identify User Attributes

SOS Guys... Is there any way to determine the user attributes, mainly if that userid is set as never expire? I do not have admin rights, and I'm working on AIX 5.3 I've tried : lsuser -f <username> but no luck on that (2 Replies)
Discussion started by: freakygs
2 Replies

8. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

9. UNIX for Advanced & Expert Users

How to : Identify changes made with root ?

Thanks Avklinux (1 Reply)
Discussion started by: avklinux
1 Replies

10. Shell Programming and Scripting

How to identify User Machine name?

Hi Experts, We 4 to 5 people are using same UNIX(Solaris) login for our testing purpose. Also we are doing some modifications to existing scripts. Is it possible to know the each user machine (IP address or machine name) who are using the same login to modify the scripts. So that we can... (12 Replies)
Discussion started by: ganapati
12 Replies
Login or Register to Ask a Question