LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-13-2006, 06:52 AM   #1
enggsultan
LQ Newbie
 
Registered: Nov 2006
Posts: 4

Rep: Reputation: 0
How to create second super user like root?


Hi,

Can anyone tell me the way for creating another superuser in linux???

Thanks in advance

sultan
 
Old 11-13-2006, 07:03 AM   #2
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 30
If your using a red hat based system check if you've got a sudeors file.
Than you can give him all rights you want
Don't forget to use visudo to edit this file.
 
Old 11-13-2006, 08:08 AM   #3
enggsultan
LQ Newbie
 
Registered: Nov 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by odcheck
If your using a red hat based system check if you've got a sudeors file.
Than you can give him all rights you want
Don't forget to use visudo to edit this file.
Acually I am using trixbox which is enclosed with centos-4 linux

And I thing this pakage is not included there??

then what would be the solution.. I mean .. Is this be done manually??

sultan
 
Old 11-13-2006, 08:52 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Here are various commands that add users, groups, or add users to groups:
Code:
adduser, 
deluser
msetuser
musertweaks
newusers
useradd
userdel
usermod
addgroup
delgroup
groupadd
groupdel
groupmod
Also:
Code:
groups <username>    (to see what groups a user belongs to)
more /etc/group    (to see all the groups and the users in each)
Use "man <command>" to get all the details on each one.

BUT: Danger, Danger---There should only be one owner/Sysadmin on a system. Otherwise, who is the one person that always knows the configuration?

Last edited by pixellany; 11-13-2006 at 08:54 AM.
 
Old 11-14-2006, 02:12 AM   #5
enggsultan
LQ Newbie
 
Registered: Nov 2006
Posts: 4

Original Poster
Rep: Reputation: 0
actually, I know how create user.. But I want to made second sysadmin... after creating user, how can I give all administrative power??

sultan
 
Old 11-14-2006, 03:10 AM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Quote:
Originally Posted by enggsultan
actually, I know how create user.. But I want to made second sysadmin... after creating user, how can I give all administrative power??

sultan
Use "sudo" as suggested above.
 
Old 11-14-2006, 03:32 AM   #7
enggsultan
LQ Newbie
 
Registered: Nov 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by reddazz
Use "sudo" as suggested above.
actually I edited sudeors by visudo...

but still no updates...actually i want another sysadmin where he will have his own password and username like root and and his
password...

it would be better if show show some exmaples

thanks
sultan
 
Old 11-14-2006, 04:01 AM   #8
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
You can't make a second root account as such, but you can make another account which is sort of an alias of the root account. FreeBSD does this by default to provide a root user with a c shell and a root user with a bash shell.

Look up how /etc/passwd is set out and add a new user in there with a UID of 0.

However, for most purposes it is much better to use sudo because of additional benefits such as restricting users to just some administrative tasks and logging.
 
Old 11-14-2006, 04:28 AM   #9
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Quote:
Originally Posted by phil.d.g
You can't make a second root account as such, but you can make another account which is sort of an alias of the root account. FreeBSD does this by default to provide a root user with a c shell and a root user with a bash shell.

Look up how /etc/passwd is set out and add a new user in there with a UID of 0.

However, for most purposes it is much better to use sudo because of additional benefits such as restricting users to just some administrative tasks and logging.
The toor account in FreeBSD is more of a rescue kind of account e.g. if you lose your root password or mess up your root account and need to gain access without resorting to single user mode. Its not an account for daily use. Obviously having two accounts that share the same uid and gid could be looking for trouble so I agree with you that sudo is the best way to go.
 
Old 11-14-2006, 05:49 AM   #10
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Off topic, so I'll keep it brief. The toor account is not "more of a rescue kind of account". It is intended to be used when the system admin wishes to use an alternate shell - http://www.freebsd.org/doc/en_US.ISO...l#TOOR-ACCOUNT
 
Old 11-14-2006, 05:53 AM   #11
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Quote:
Originally Posted by phil.d.g
Off topic, so I'll keep it brief. The toor account is not "more of a rescue kind of account". It is intended to be used when the system admin wishes to use an alternate shell - http://www.freebsd.org/doc/en_US.ISO...l#TOOR-ACCOUNT
First time I have seen that doc. My reference was http://www.freebsddiary.org/toor.php which is much older than the official FreeBSD docs. Cheers.

Last edited by reddazz; 11-14-2006 at 06:00 AM.
 
Old 11-14-2006, 06:13 AM   #12
bokopperud
LQ Newbie
 
Registered: Nov 2006
Location: Norway
Distribution: Mandriva
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by phil.d.g
You can't make a second root account as such, but you can make another account which is sort of an alias of the root account. FreeBSD does this by default to provide a root user with a c shell and a root user with a bash shell.

Look up how /etc/passwd is set out and add a new user in there with a UID of 0.
Sorry a bit OT...

Apart from it being a stupid thing to do security-wise, would it be possible to give the "other" root-user a different home-directory? Of course the two root users could look and make havoc in eachother folders (as both would be owned by root)...

-Koppe
 
Old 11-14-2006, 06:24 AM   #13
bokopperud
LQ Newbie
 
Registered: Nov 2006
Location: Norway
Distribution: Mandriva
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by enggsultan
Can anyone tell me the way for creating another superuser in linux???
I agree that using 'sudo' is the obvious choice, but out of curiosity; would it be possible to create a "near root" user, by adding him to certain groups? I was thinking first and foremost of the root-group, but maybe also (additionally) groups like adm, sys, rpm. I know the root-group isn't like the Administrator-group in Windows (*yuck*), but could it possibly be used in a somewhat similar way?

-Koppe
 
Old 11-14-2006, 07:05 AM   #14
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Quote:
Originally Posted by bokopperud
Sorry a bit OT...

Apart from it being a stupid thing to do security-wise, would it be possible to give the "other" root-user a different home-directory? Of course the two root users could look and make havoc in eachother folders (as both would be owned by root)...

-Koppe
Not something I have tried, nor particularly feel the need to. It might work, though would probably confuse some programs.


Quote:
Originally Posted by bokopperud
I agree that using 'sudo' is the obvious choice, but out of curiosity; would it be possible to create a "near root" user, by adding him to certain groups? I was thinking first and foremost of the root-group, but maybe also (additionally) groups like adm, sys, rpm. I know the root-group isn't like the Administrator-group in Windows (*yuck*), but could it possibly be used in a somewhat similar way?
No, this is something I would strongly reccommend against doing. You would need to alter the permissions of the system binaries concerned and probably make use of ACLs, a horrible hack when compared to using sudo. Furthermore after applying updates to the system all your "settings" will be lost.

And reddazz, not a problem!

As a final note, whilst we are discussing these different methods please use the most sensible option there, in the majority of cases that means using sudo. In the case were you have two system admins for a system, if both admins are to be trusted with a root account then there should be no problem using the same root account and both knowing the password.
 
  


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
root(super user) is unable to login by using Telnet mahabooba Linux - Networking 10 02-02-2006 11:40 PM
Create a New Super user account blazted Linux - Newbie 6 02-13-2005 03:56 PM
how to run ifconfig as root without super user terminal GUIPenguin Linux - General 1 01-15-2005 10:06 AM
How Do I Create A Super User That Can Do Anything? rpgdeveloper Linux - Newbie 6 11-16-2004 01:02 PM
Super User mode, my root password doesn't work? kko88 Linux - Newbie 8 05-20-2003 06:01 PM


All times are GMT -5. The time now is 07:11 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