You are not logged in.
Pages: 1
Hi everyone,
I feel this is a very stupid newbie question. I am trying to give a user access to sudo. I have two lines uncommented in /etc/sudoers:
root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
I am using visudo but it edits with nano.
I have tried to add this user to the wheel group (usermod -G wheel -a peter).
Do I need to run a command or reboot?
This is the result of the groups command so I think I have added the user to the group.
# groups peter
wheel peter
Last edited by pedro_sland (2011-05-20 19:56:57)
Offline
you have to use
gpasswd -a peter wheel
. after that you have to log out / in.
Offline
To be precise: Peter has to log out and in again.
Offline
Thanks! That worked great.
I'm confused now though. What exactly does "usermod -G" do and what does "gpasswd -a" do? I did man and google it but I wasn't any clearer about the difference.
Offline
in your first post your wrote groupadd -G.
for the rest
man gpasswd
man groupadd
man usermod
and this https://wiki.archlinux.org/index.php/Us … management
;-)
Last edited by hcjl (2011-05-20 13:01:43)
Offline
I did write groupadd! I know what that does. Man tells me there is no -G for groupadd so I'm certain I didn't do that. I meant usermod -G. I've read the man pages again but as far as I can understand, "usermod -G wheel -a peter" should have worked. What am I missing?
Offline
problem is solved, please mark as [SOLVED]
Offline
@roygbiv
While the problem is solved I refrained from marking it as such as I was hoping someone would answer my question in #6 (it was a deliberate choice not to mark it as solved).
Offline
I did write groupadd! I know what that does. Man tells me there is no -G for groupadd so I'm certain I didn't do that. I meant usermod -G. I've read the man pages again but as far as I can understand, "usermod -G wheel -a peter" should have worked. What am I missing?
The command is correct and should have worked as expected.
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
Strange. Thanks loafer, hcjl and Awebb for your contributions.
Offline
Pages: 1