[Redhat] make "admin" account same privledges as "root"
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[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.
*EDIT*
oops posting in wrong section.. was gonna ask a Networking question but forgot to switch to the correct thread. sorry bout this..
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....
Code:
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
%admins ALL=(ALL) ALL
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.
Code:
# 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
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 .... %admins ALL=(ALL) NOPASSWD: ALL
Note: the file seems to be using tabs and not spaces.
The user admin would seem to have an entry like this .... admin ALL=(ALL) NOPASSWD: ALL
Even so, I have no success yet getting this to work with no password.
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
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...
Code:
$ 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.
Password:
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... fred ALL=(ALL) NOPASSWD: ALL
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.
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..?
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?
fred ALL=(ALL) NOPASSWD: ALL
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.
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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.