UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
I would like to know how to set these users as admin. like in Windows. I'm root, but I want them to be able to perform administrative task such as making changes to Apache, MySQL, etc.. For MySql do I have to create a separate account for MySql or can they use the same login name?
You have to run visudo first and uncomment the wheel group. Then you'll need to add the admin users to the wheel group in /etc/group. Afterward you can run any command using the sudo command.
Thanks ramram29 and aysiu. When I run "sudo adduser User1 admin" I get:
'The group admin does not exist'
ramram29 I don't see andy wheel group here at the the visudo file, when I run the visudo command this is what I get:
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
# Host alias specification
I added the line: "%admin ALL=(ALL) ALL" using visudo, then when I ran the command "sudo adduser User1 admin" I got: The group 'admin' does not exist. Do I have to do addgroup admin as well??
1. Uncomment or add the admin group to the sudoers file. As root type 'visudo'. It will enter the file in vi. In the sudoers file uncomment or add the group admin as '%admin ALL=(ALL) NOPASSWD: ALL'. Comment all the other lines. In Ubuntu the group is called admin and in Fedora and SUSE it's called wheel. Exit and save this file by pressing :wq.
2. Edit /etc/group and make sure the admin group contains the accounts that you want to have root priviledge. For example,
admin:x:19:user1,user2,user3
Only add the users. The number 19 is the group number - you don't have to change the group number that is already there.
3. Logged in under any of these accounts you can then type the command 'sudo' followed by any command with root priviledge and it will let you run that command. For example, 'sudo shutdown -r now' will allow you to restart the system logged in as user1, who is a member of the sudoers group.
If you where able to restart Linux as stated above then it should be working. To very, try to type the same root priviledge command using an account that is not a sudoer.
But I'm cucolin@. Hey ramram29 evethough I made users with admin priviledges I still need to give them permissions for the files. I cannot make any changes with those users acct. to the /var/www files that I have there or some apache files.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.