create user like root


 
Thread Tools Search this Thread
Operating Systems AIX create user like root
# 8  
Old 01-25-2006
What alpha*test says is correct, but: Unix identifies users by looking up their UID/GID in /etc/passwd. Whoever comes first there will be shown as owner of files/directories, because the ownership is established not by storing the name but by storing the UID in the directories structure. Hence:

Code:
$ su - root2
# id 
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)

# touch a_file
# ls -l
total 3496
-rwxr-x---   1 root     system            0 Jan 21 2006  file_created_by_root
-rwxr-x---   2 root     system            0 Jan 21 2006  a_file

#

You see, even when yo switch to root2 you look like you are root.

bakunin
# 9  
Old 01-25-2006
thank you for your help
# 10  
Old 02-09-2009
Hello,

This configuration works fine but there is another problem though. If you do a ssh session to another server, the system will simply log you on as 'root' and not as the new user with root previleges. The new user however does exist on the other server and also has root previleges and the necessary SSH keys. Any ideas?


Kind regards,
Karel
# 11  
Old 02-09-2009
I think this goes back to what was said earlier. UNIX identifies the user by the UID, not the name. So if root2 is operating under UID 0, then it will still be seen as 'root' by the receiving system (the one you SSH to).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to create a file even root user also cant delete?

Is there any way to create a file in linux that root user also can't delete? (8 Replies)
Discussion started by: palani13dec
8 Replies

2. UNIX for Dummies Questions & Answers

Create user with sudo ability to root.

Hi All, I need to give an user sudo ability to root. We have also generated RSA key but unable to proceed further. For example after a user logs into the server normally and when he executes below command $ssh root@server_name This should take you to root prompt # Please help me.... (3 Replies)
Discussion started by: Rockyc3400
3 Replies

3. 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

4. AIX

How to create a user as a root

please give me any suggestion, how can i create user as root privilege. (please give me very safest way because i have production servers) (5 Replies)
Discussion started by: reply.ravi
5 Replies

5. Solaris

Unable to create or delete a directory in /usr with root user

Hi All, I am trying to uninstall jdk 1.5 from my Solaris 10 64 bit but some how was not successful.so tried to delete the folder of jdk from /usr but its throughing error as: Unable to remove directory jdk: Read-only file system Even I tried to create a dir in /usr but its not allowing me... (4 Replies)
Discussion started by: Pshah
4 Replies

6. 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

7. Shell Programming and Scripting

How to create a directory inside root as different user

Hi All, I have directory under /opt/test. The ownership of the test directory is root:root. I have login to the server as test user. I need to have some script to create a directory inside /opt/test. This script will be called as test user. When I try to execute... (4 Replies)
Discussion started by: kalpeer
4 Replies

8. UNIX for Advanced & Expert Users

Other than root user .Normal user is unable to create files

Hi all, I am using Sun Solaris 9 .In this system normal users unable to create files from the command line.I added these users in bin,adm and even root group i found them unable to create a file. (1 Reply)
Discussion started by: mallesh
1 Replies

9. Red Hat

How can l create a user that as all the Attribute & Privilages of root

Hi, Is it possible to create a user in Linux 8.0 with all the attribute and the privilages of super user (root). Without using root as the logg in name. Thanx (6 Replies)
Discussion started by: kayode
6 Replies

10. UNIX for Dummies Questions & Answers

create or modify user account to have same access as root

Is there a way to create or better yet modify a user account so it has the same privs as root? (6 Replies)
Discussion started by: xadamz23
6 Replies
Login or Register to Ask a Question