LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-08-2003, 08:00 PM   #1
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Rep: Reputation: 30
root!!!


i want to create a user who has a same power as root.
how can i do this, besides just prompt #adduser yenonn?
thanks!
 
Old 05-08-2003, 08:03 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
You can't ... that's why there is such a thing
as a root user :} ... root = UID 0, and numerical
UIDs are unique.

You can, however, setup a sudoer file that
might cover most of roots priviliges for a non-
root user ...

Cheer,
Tink
 
Old 05-08-2003, 08:11 PM   #3
PTBmilo
Member
 
Registered: Jan 2003
Posts: 167

Rep: Reputation: 30
Yes you can.

/etc/passwd:
Code:
root:x:0:0::/root:/bin/bash
root2:x:0:0::/root:/bin/bash
Now you have two user names for uid 0, root and root2
 
Old 05-08-2003, 08:17 PM   #4
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
I was also under the impression user id's are unique.
You can however add your other user to as many groups as possible, in order to simulate the power of root, but if something needs to be really done as root, that user won't be very effectively.
If you just want a cool name for the superuser, change the name root in /etc/passwd /etc/shadow and /etc/group to whatever you want.
When su'ing, you'll need to specify the superuser name though like
normaluser@host $ su supercoolname
<passwd>
supercoolname@host #
 
Old 05-08-2003, 08:45 PM   #5
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Original Poster
Rep: Reputation: 30
ok, i edited the /etc/passwd, by adding
poweradmin:x:0:0:,,,/root:/bin/bash
then, i saved it! go back to my terminal
i su root, then, enter password (this is normal). then
i su poweradmin, (something i have seen before), it
shows sh-2.05b#, instead of [root@localhost root].
i tested on here by prompting some commands that need
authentication by root, such as rpm -ivh ***.rpm.
then, it let me thru, meaning that i have a root power, right now!
so, my question is that, if i do something like this, will this be harmful to my system? thanks!

Last edited by yenonn; 05-08-2003 at 08:46 PM.
 
Old 05-08-2003, 08:52 PM   #6
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
I personally won't do it, if you just want a cool name, just change the name root to something else.
Superuser name doesn't has to be root after all.
In fact speaking in terms of security, it'd be better if it was something else.
 
Old 05-08-2003, 08:54 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Basically its a security issue having another user with the same power as root. If I was you, I would either su to root when needed or setup sudo. But never give or create a user with the same permissions and power. LQ cannot be held responsible for the damage it can cause to your system on any outcome.

Oh and most likely you have a different bash prompt is that its using the default terminal or command prompt. You can edit this by placing a .bashrc file in your poweradmins home directory.

Just because you can install an RPM doesn't mean you have root power. Try editing a file owned by root to see if you can, that is a better test.
 
Old 05-08-2003, 08:59 PM   #8
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
Re: root!!!

Quote:
Originally posted by yenonn
i want to create a user who has a same power as root.
how can i do this, besides just prompt #adduser yenonn?
thanks!
Why?

The recommended way is to open an x terminal and issue this command and give the password.
Code:
[phil@tinwhistle phil]$ su -
Password: 
[root@tinwhistle root]#
Now, that x terminal has "god" powers over your box.
 
Old 05-08-2003, 09:02 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally posted by PTBmilo
Yes you can.

/etc/passwd:
Code:
root:x:0:0::/root:/bin/bash
root2:x:0:0::/root:/bin/bash
Now you have two user names for uid 0, root and root2
Yes, I've done that before...
And the point of that exercise?
You're just setting a trap for a newbie.

It still comes down to having ONE UID, one guy
with two homedirs, and the risks by far outweigh
the advantages (if there are any ;})...

Cheers,
Tink
 
Old 05-08-2003, 09:03 PM   #10
PTBmilo
Member
 
Registered: Jan 2003
Posts: 167

Rep: Reputation: 30
I agree... It's probably not good practice. Like tinkster suggested, check out the sudo program.

I have only tried this when I was going to give root a different login shell, and wanted to make sure that I would be able to get in if something went wrong.

A good example of the system not giving a darn about the name, type "whoami" as your new user.
 
Old 05-08-2003, 09:08 PM   #11
PTBmilo
Member
 
Registered: Jan 2003
Posts: 167

Rep: Reputation: 30
Quote:
Originally posted by Tinkster
Yes, I've done that before...
and the point of this excersize?

I wasn't trying to 'set a trap for a newbie', just showing that it is possible

Quote:
Originally posted by Tinkster
You can't ... that's why there is such a thing as a root user
 
Old 05-08-2003, 09:38 PM   #12
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Original Poster
Rep: Reputation: 30
thanks everybody!!!! thanks all Linux gurus!!!! just curious on this, i won't set up the trap for myself anyway!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL3 Mounting USB after reboot and between reboots: root and non-root users Luis Nunes Linux - Hardware 0 07-20-2005 09:32 AM
IntelliMouse thumb buttons work as root, broken as non-root user, wheel works always digital vortex Linux - Hardware 7 03-02-2004 05:14 PM
root files: create as root:root or root:wheel? pcass Linux - Security 1 02-07-2004 05:14 PM
cant resize root thru rescue, auto mounts root dir absolutal Linux - Newbie 0 06-18-2003 04:06 PM
Why does kppp.desktop require root userid for non-root user? rdaves@earthlink.net Linux - Networking 4 08-27-2001 10:18 AM


All times are GMT -5. The time now is 05:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration