-   Linux - Networking (
-   -   [Redhat] make "admin" account same privledges as "root" (

Bi0haZarD 01-11-2005 09:45 AM

[Redhat] make "admin" account same privledges as "root"
I got the normal root account and an admin account... is there a way to make the "admin" account have the same privleges as the root account? I've tried putting admin in the same group as root, but still get the "Password for root" dialog box.

I know the root password but want the 2 accounts incase i screw anything up. I just installed Linux about 3 hours ago so i'm a complete newb lol.

oops posting in wrong section.. was gonna ask a Networking question but forgot to switch to the correct thread. sorry bout this..

homey 01-11-2005 10:44 AM

Have a look at man sudoers

Edit:You must use the command:visudo as root user.
Apparently tabs are used instead of spaces.
Edit: The % is used for groups. So the admins group would have an entry like this ...
%admins ALL=(ALL) ALL
and a user admin would have an entry like this ...
admin ALL=(ALL) ALL

Where you could put a line for admins like this....

# Uncomment to allow people in group wheel to run all commands
# %wheel        ALL=(ALL)        ALL
%admins        ALL=(ALL)        ALL

Bi0haZarD 01-11-2005 11:02 AM

hope i didn't screw up this file i edited it in gedit then noticed the "MUST be changed in visuedo (or whatever)" lol.

how do i go about saving this file in visudeo..

<---- :newbie:

*Insert Cusswords here* seems that saving that file in gedit results in the file getting deleted or emptied.. lol.

homey 01-11-2005 11:22 AM

Edit: Use the command: visudo as root user

press insert key to make changes
when you are done, press the esc key
To save the file with changes, type exactly: :wq!
If you decide not to save changes, type exactly :q!

Edit: If you made some errors which the visudo knows are errors, it gives you the choice to fix those errors.

Here is a copy of mine.

# sudoers file.
# This file MUST be edited with the 'visudo' command as root.
# See the sudoers man page for the details on how to write a sudoers file.

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# User privilege specification
root        ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
# %wheel        ALL=(ALL)        ALL

# Same thing without a password
# %wheel        ALL=(ALL)        NOPASSWD: ALL

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now

Bi0haZarD 01-11-2005 04:49 PM

ok, changed the file in vi. added:


%admin    ALL=(ALL)    ALL
but still asks for the password. do the number of spaces matter?

homey 01-11-2005 05:35 PM

Edit: I'm sorry to have given you such boggus information before! :(
I have had a chance to try this out and have no success getting the no password part to work yet.

The file must be edited by using the command: visudo as the root user.
The admins group ( do you have an admins group on the linux box ) would seem to have an entry like this ....

Note: the file seems to be using tabs and not spaces.

The user admin would seem to have an entry like this ....

Even so, I have no success yet getting this to work with no password.

Bi0haZarD 01-12-2005 02:45 AM

thanks anyways, i'll just keep entering the root password whenever need be, its not to much of a problem as its login with the password then it saves it till you tell it to forget it.

Thanks for trying and helping out a complete linux :newbie:

homey 01-12-2005 09:12 AM

Well I've had time to figure this out and it was too easy! :)
The sudoers file allows you to run the sudo command and to run it without a password!
For Example:
Using my favorite user fred to run the synaptic program requires a root password. And using the command sudo synaptic gives me this kind of output...

$ sudo synaptic

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these two things:

        #1) Respect the privacy of others.
        #2) Think before you type.

fred is not in the sudoers file.  This incident will be reported.

That looks kinda scary! Good thing, I'm the administrator :)
Now, I use the visudo command ( as root ) to add fred to the sudoers file...
Saved the changes with the command: :wq!
logged in as user fred and ran the command: sudo synaptic Presto! synaptic starts up with no password required.
Now for one better, I decide to put an synaptic icon on the desktop that can be run as sudo user.
Just make a new link to application as normal.
Right click on the icon / Properties
Select: Application tab
Select: Command:sudo synaptic

Now I can click on the icon and run an application with no root password.

Bi0haZarD 01-12-2005 09:22 AM

yay, i'll give this a try right now. thanks :)

hmm.. did the sudo synaptic command before editing the sudoers file and just got "Password:" now when i run it, it says synaptic isn't a valid command..?

homey 01-12-2005 09:47 AM

Maybe you need the full path on your system.
$ whereis synaptic
synaptic: /usr/bin/synaptic /usr/sbin/synaptic /usr/share/synaptic /usr/share/man/man8/synaptic.8.gz

$ sudo /usr/bin/synaptic

When you put the entry in visudo, did you use tabs instead of spaces?

Bi0haZarD 01-12-2005 09:48 AM

yea used Tabs, i'm restarting right now cause kept logging out and it still had the keys by the clock saying i was root. so seeing if it just wasn't logging me out or what.

reddazz 01-12-2005 09:49 AM

Why do you need a user with full root privileges? If you give a user root privileges and they screw up something on the system, it'll still affect everyone even if it's not root who has screwed up.

Bi0haZarD 01-12-2005 09:52 AM

I want a user with full/high admin access root so that i can play around with stuff, if i screw it up I still have root to go back to.

(EDIT, ok that didn't make sence.. i just started linux yesterday and even a simple problem would cause hell for me lol. its like learning a new language since i've been a Windows user for about 12 years going back from windows 3.1.. if i screw around with like a language option and can't figure how to switch it back to english i still have the root account to do whatever.. thats if it doesn't make the change globally to all accounts)

doing the "whereis synaptic" only returned "syanptic:" with no path

homey 01-12-2005 10:02 AM

I just used synaptic as an example. That GUI tool for apt-get may not be installed on your box.
You could try it with the program you originally wanted to use or if you do want to install synaptic as root user, try the command: apt-get install synaptic or yum install synaptic.

mikeyt_333 01-12-2005 10:03 AM

that just means that you don't have synaptic installed, don't worry about it unless you need synaptic. Synaptic is a frontend to apt a package manager. The example was just using synaptic as the command an unpriviledged user would be able to execute. do a sudo ifconfig which is normally not in a normal users path, but in roots path.

EDIT: I was beet to the punch with this post, sorry for the double.

All times are GMT -5. The time now is 11:31 PM.