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.
Hi, I am trying to get sudo to work on my machine, but I keep getting the following message when ever I try to use sudo: "userName is not in the sudoers file. This incident will be reported". how ever userName is in the sudoers file. Here are the steps I took to add my user to sudo
groupadd usrName sudo
nano /etc/group check that sudo:x:1000:usrName
nano /etc/sudoers uncomment %sudo ALL=(ALL:ALL) ALL
nano /etc/profile set sys path to "/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/sbin:/sbin"
reboot
test sudo
Is there another step I am missing to enable sudo. As a side note after I enable sudo I'll like to limit how much I can do with sudo but first I need to ge the basics to work. I am used to archlinux and I want to switch to slackware because I am tired of the 'rolling updates' and want something more stable.
Moderator, if you want you can delete this tread. right after posting I looked in my group file and saw this line usrName:x:1000: and I deleted it. now sudo is working
4. nano /etc/profile set sys path to "/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/sbin:/sbin"
One note on this: rather than editing the system-wide path it's probably better to have your sudo path set within sudo itself. Check out these lines in sudoers:
Code:
## Uncomment to use a hard-coded PATH instead of the user's to find commands
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Just use "su" instead. I dislike "sudo" because it has cleared the path for many "modern" distros to not even setup a root account and deny running many apps as root. I love CLI and commonly do not boot directly to X11 but when editing most config files I prefer using a Super User File Manager that will launch a root level editor as I need it and give me a split screen so I can do compares all in one place and visually.
nano /etc/group check that sudo:x:1000:usrName # ok
nano /etc/sudoers uncomment %sudo ALL=(ALL:ALL) ALL # not a good idea
nano /etc/profile set sys path to "/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/sbin:/sbin" # why do you need this?
reboot
test sudo
Is there another step I am missing to enable sudo. As a side note after I enable sudo I'll like to limit how much I can do with sudo but first I need to ge the basics to work. I am used to archlinux and I want to switch to slackware because I am tired of the 'rolling updates' and want something more stable.
Yes, you need to remove that ALL= line and allow only what is really required. This is just a security hole.
Sudo was created to give limited, specific administrative rights to persons who needed them to fulfill their responsibilities, not to be a substitute for root.
Just use "su" instead. I dislike "sudo" because it has cleared the path for many "modern" distros to not even setup a root account and deny running many apps as root. I love CLI and commonly do not boot directly to X11 but when editing most config files I prefer using a Super User File Manager that will launch a root level editor as I need it and give me a split screen so I can do compares all in one place and visually.
Eh, to each their own. I use sudo on one-off commands requiring root. If I'm doing several tasks as root, I'll su.
Either way I think almost everyone can agree that using sudo or su is better than running everything as root
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.