Sponsored Content
Full Discussion: Equivalent uid to root
Operating Systems AIX Equivalent uid to root Post 302756037 by Scott on Tuesday 15th of January 2013 04:49:42 AM
Old 01-15-2013
It should depend on the order the users are in the passwd file.

Code:
# head -2 /etc/passwd
root:x:0:0:root:/root:/bin/bash
postgres:x:0:4003:Postgres owner:/home/postgres:/bin/bash
 
# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk)
 
(change order in passwd file...)
 
# head -2 /etc/passwd
postgres:x:0:4003:Postgres owner:/home/postgres:/bin/bash
root:x:0:0:root:/root:/bin/bash
 
# su -
# id
uid=0(postgres) gid=4003(postgres) groups=4003(postgres)

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Hw to create root-equivalent accounts?

Hi all. After installing ssh on a server, i'd like to create a user with root privileges. My problem is that after creating a user rootssh (uid=0, gid=20, /home/rootshh), i make rootssh's ssh keys. The problem is that normally the ssh-keygen should create the keys under $HOME/.ssh/, and actually... (6 Replies)
Discussion started by: penguin-friend
6 Replies

2. UNIX for Dummies Questions & Answers

Run non-root script as root with non-root environment

All, I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
Discussion started by: bubba112557
2 Replies

3. UNIX for Advanced & Expert Users

Setuid Program with (-rwsr-sr-x 1 root other ) UID/EUID issue

Hi, I have a program with the following suid setup -rwsr-sr-x 1 root other 653 Aug 16 17:00 restart_server It basically starts up a service that has to be started by root. I just want the normal users to be able to restart the service using the script above. But when the... (7 Replies)
Discussion started by: 0ktalmagik
7 Replies

4. Shell Programming and Scripting

UId

is tty command opens a process in the system if yes then why process got the userid????? (5 Replies)
Discussion started by: Mac91
5 Replies

5. UNIX for Dummies Questions & Answers

Duplicated UID

Hi folks! I need you help to discover what's the impact of a duplicated UID in an operating system. What's the meaning when someone put in different users the same UID? (3 Replies)
Discussion started by: phcostabh
3 Replies

6. AIX

More than 1 UID 0

Hi, Can any one please tell what are the risks of having more than one users having UID 0 (root)? Thanks Naveed (9 Replies)
Discussion started by: naveedaix
9 Replies

7. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

8. Solaris

New root account with Different UID number

Hi Unix Gurus . I have requirement where in which - I would like create duplicate root equivalent account with all the privileges equal to root. Is it possible to create this duplicate account with different UID. ? this id i would like give it to my teams - who does multiple activities using... (2 Replies)
Discussion started by: johnavery50
2 Replies

9. Shell Programming and Scripting

Find users with root UID or GID or root home

I need to list users in /etc/passwd with root's GID or UID or /root as home directory If we have these entries in /etc/passwd root:x:0:0:root:/root:/bin/bash rootgooduser1:x:100:100::/home/gooduser1:/bin/bash baduser1:x:0:300::/home/baduser1:/bin/bash... (6 Replies)
Discussion started by: anil510
6 Replies

10. SuSE

Non root user want to see /var/log/messages - any suse equivalent of Solaris dmesg

Hi New to Suse - mainly used Solaris. In solaris dmesg will also show you contents of messages log file but in Suse Liux it doesnt appear to. I dont have root access to this Suse server, and wondering is there any other tool / utility that allows me to see the messages file contents like on... (1 Reply)
Discussion started by: frustrated1
1 Replies
PASSWD(5)							File Formats Manual							 PASSWD(5)

NAME
passwd, group, shadow - user and group databases, shadow passwords SYNOPSIS
/etc/passwd /etc/group /etc/shadow DESCRIPTION
/etc/passwd lists all the users of the system, and /etc/group lists all the groups the users may belong to. Both files also contain encrypted passwords, numeric ID's etc. Encrypted passwords may be hidden in the file /etc/shadow if extra protection is warranted. Each file is an text file containing one line per user or group. The data fields on a line are separated by colons. Each line in the password file has the following form: name:passwd:uid:gid:gecos:dir:shell The name field is the login name of a user, it is up to 8 letters or numbers long starting with a letter. The login name must be unique. The password field is either empty (no password), a 13 character encrypted password as returned by crypt(3), or a login name preceded by two number signs (#) to index the shadow password file. Anything else (usually *) is invalid. The uid and gid fields are two numbers indicating the users user-id and group-id. These id's do not have to be unique, there may be more than one name with the same id's. The gecos field can be set by the user. It is expected to be a comma separated list of personal data where the first item is the full name of the user. The dir field is the path name of the users home directory. Lastly the shell field is the path name of the users login shell, it may be empty to indicate /bin/sh. A Minix specific extension allows the shell field to contain extra space separated arguments for the shell. Lines in the group file consist of four fields: name:passwd:gid:mem The name field is the name of the group, same restrictions as a login name. The passwd field may be used to let users change groups. The gid field is a number telling the group-id. The group-id is unique for a group. The mem field is a comma separated list of login names that are special members of the group. If a system supports supplementary group id's then a user's set of supplementary group id's is set to all the groups they are a member of. If a system allows one to change groups then one can change to a group one is a member of without using the group's password. The shadow password file has precisely the same form as the password file, except that only the name or passwd fields are used as yet. The other fields are zero or empty. A password in the password file may have the form ##user to indicate the entry user in the shadow password file. The password in this entry is then used for authentication of the user. The shadow file can only be read by the privileged utility pwdauth(8), so that the encrypted passwords in the shadow file are kept secret, and thus safe from a dictionary attack. Special password and group file entries There are several entries in the password and group files that are preallocated for current or future use. All id's less than 10 are reserved. The special password file entries are: root:##root:0:0:Big Brother:/usr/src: daemon:*:1:1:The Deuce:/etc: bin:##root:2:0:Binaries:/usr/src: uucp:*:5:5:UNIX to UNIX copy:/usr/spool/uucp:/usr/sbin/uucico news:*:6:6:Usenet news:/usr/spool/news: ftp:*:7:7:Anonymous FTP:/usr/ftp: nobody:*:9999:99::/tmp: ast:*:8:3:Andrew S. Tanenbaum:/usr/ast: The root id is of course the super user. The daemon id is used by some daemons. Some devices are protected so that only those daemons can access them. The bin id owns all sources and most binaries. The uucp, news and ftp id's are for serial line data transfer, usenet news, or ftp if so needed. The nobody id is used in those cases that a program may not have any privileges at all. The ast id is the honorary home directory for Andrew S. Tanenbaum, the creator of Minix. You can also find the initial contents for a new home directory there. The special group file entries are: operator:*:0: daemon:*:1: bin:*:2: other:*:3: tty:*:4: uucp:*:5: news:*:6: ftp:*:7: kmem:*:8: nogroup:*:99: Groups with the same name as special user id are used with those id's. The operator group is for the administrators of the system. Users in this group are granted special privileges. The other group is for ordinary users. The tty group is for terminal devices, and associ- ated set-gid commands. Same thing with the kmem group and memory devices. FILES
/etc/passwd The user database. /etc/group The group database. /etc/shadow The shadow password file. SEE ALSO
login(1), passwd(1), su(1), crypt(3), getpwent(3), getgrent(3), pwdauth(8). NOTES
The nobody and nogroup id's are likely to be renumbered to the highest possible id's once it is figured out what they are. AUTHOR
Kees J. Bot (kjb@cs.vu.nl) PASSWD(5)
All times are GMT -4. The time now is 07:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy