SlackwareThis Forum is for the discussion of Slackware 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've just installed Slackware64 13.1 on my PC and I have a problem with sudo command.
I have added myself to "wheel" group
Code:
wheel:x:10:root,zosty
and I have modified the /etc/sudoers file in order to allow to "wheel" members to run any command with root privileges....
Code:
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# 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
# Runas alias 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
but it doesn't work...
Where is my mistake?
Thanks!
Z
If you run the 'groups' command as user zosty, do you see the wheel group listed in the output? If not, either log out/in again or start a subshell under the new group with 'newgrp wheel'. sudo should then work for you in either case.
I'm curious what you see in your /var/log/syslog and on your console when you try to run any command under sudo. If I take myself out of the wheel group, I see this:
Code:
dmaxwell@nix0:~$ sudo ls -l /root/
Password:
dmaxwell is not in the sudoers file. This incident will be reported.
dmaxwell@nix0:~$
...
Jun 5 10:42:49 nix0 sudo: dmaxwell : user NOT in sudoers ; TTY=pts/3 ; PWD=/home/dmaxwell ; USER=root ; COMMAND=/usr/bin/ls -l /root/
Ah, OK, so sudo does work for you. This is just a path issue - just add /sbin, /usr/sbin and maybe /usr/local/sbin/ to your $PATH, or use the absolute paths, like this:
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
Personally I never use sudo and don't really like setting up sudoers. I find it much more convenient to run a command as root with :
Code:
su -c "command"
where command is what I want to run. Admittedly this needs the root password but as it's only me using this it's no problem. This also automatically sets up the paths for the superuser.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.