Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
look at your groups, --> wheel if you go that add use to that group.
id yourself to see if you got wheel that too is a sudoers group, check your sudoers file for the wheel setting. admin stuff you need to do to confirm your questions on whos sudo group am I using?
look at your groups, --> wheel if you go that add use to that group.
id yourself to see if you got wheel that too is a sudoers group, check your sudoers file for the wheel setting. admin stuff you need to do to confirm your questions on whos sudo group am I using?
yes it does, you need a group to be attached to to get general sudo privs period. wheel or sudo if you want to play customized sudoers config fine, but for most users it is just the means to attach a user to the group, wheel or sudo and have the permissions to that group set.
Code:
root ALL=(ALL) ALL
## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL
## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL
## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL) ALL
notice the two groups mentioned in sudoers conf, wheel sudo
that too is why I told OP to check his id and the sudoer config file to put two and two together. Whence he figures out what he has to get sudo privs then he can mimic that for the other, anything more then he too can ask, or look into it.
yes it does, you need a group to be attached to to get general sudo privs period. wheel or sudo if you want to play customized sudoers config fine, but for most users it is just the means to attach a user to the group, wheel or sudo and have the permissions to that group set.
Code:
root ALL=(ALL) ALL
## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL
## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL
## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL) ALL
notice the two groups mentioned in sudoers conf, wheel sudo
I don't understand you , I'm not familiar with linux , so can you be more explicit
I don't understand you , I'm not familiar with linux , so can you be more explicit
read up on sudo to get a basic understanding of it. id yourself
Code:
$ id
uid=1000(userx) gid=1000(userx) groups=1000(userx),0(wheel),5(operator),44(video)
to see what group you're in for sudo. sudo nano /etc/sudoers or just nano /etc/sudoers so changes cannot take place, and take a look through it. mostly on the bottom to see how to give a user attached to the group wheel or sudo root privs.
so you need to find out what group is being used, what is your group, or are you logged in as root? what distro are you using too is a big thing. some use sudo and others use wheel. you can give a user rights in the sudoers file for specific commands, but again go back to read up on sudo how to's to get yourself more understanding of sudo.
if this is just a general give user root privs then find the group your system is using to do so, then use that one.
Because if you already have sudo and it works with your user then your sudoers file is already setup for additional user to be put in that group for the same privileges.
Wrong, privs can be assigned at individual user levels in /etc/sudoers, no group necessary.
Directly assigning individual users makes it easier to see in the file who can do what.
But hey, not getting in to a "measuring contest" here so whatever.
I was speaking in general terms . as you should know that one attached to wheel, or sudo gets root privileges, depending on what system they are using, even though you're speaking in specific commands root privileges need to be had to run.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
It would help if you say which distribution you want to do this in. Given you're using the usermod command; am I right in assuming this user you wish to give sudo rights to already exists on your system?
Because it depends on the distribution concerned as to which user group is configured in /etc/sudoers From my searches, in Ubuntu it's the "sudo" group that you need to add the user to, that you wish to give sudo rights to. In other distributions it might be the "wheel" group, like in the distribution I'm using. Although, you can change which group has sudo rights in the /etc/sudoers file (you can use any text editor to edit that file - it doesn't matter what text editor you use).
The point about the command visudo is that it checks your edit before saving: if you seem to have made a mistake it asks you if you want to try again, save and risk it, or give up! Normally it uses vi as an editor. If you want to avoid that, use the command
export EDITOR=nano
(or whatever you want to use as the editor). I always put that in my .bashrc file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.