LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-29-2021, 01:34 PM   #1
fresh_orange_0
LQ Newbie
 
Registered: May 2021
Posts: 25

Rep: Reputation: Disabled
Added a new user to the sudoers file but I can't use "installpkg" with that account


Hello,

Added a new user to the sudoers file but I can't use "installpkg" with that account

What else do I need to do in order to use "installpkg" with the new user that is now in the sudoers file?

Thank you very much!
 
Old 05-29-2021, 01:43 PM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
how did you do that? I mean: how did you add it to the sudoers file and how did you try to run installpkg?
 
Old 05-29-2021, 01:56 PM   #3
fresh_orange_0
LQ Newbie
 
Registered: May 2021
Posts: 25

Original Poster
Rep: Reputation: Disabled
Added it to the sudoers file in the following way:

Quote:
username ALL=(ALL) ALL
And tried to use from <username> the installpkg command with:

Code:
sudo installpkg
The output was:

Code:
sudo: installpkg: command not found
 
Old 05-29-2021, 02:13 PM   #4
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
/sbin is probably not in your path. Try /sbin/installpkg instead.
 
2 members found this post helpful.
Old 05-29-2021, 02:17 PM   #5
fresh_orange_0
LQ Newbie
 
Registered: May 2021
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hendrickxm View Post
/sbin is probably not in your path. Try /sbin/installpkg instead.
Thank you very much! That solved the problem

Anything else I should add to my path?
 
Old 05-29-2021, 02:34 PM   #6
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Slackware
Posts: 7,341

Rep: Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744Reputation: 3744
On a related note I always use the following command to set-up sudo for my regular user.

# visudo
 
Old 05-29-2021, 02:57 PM   #7
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Uncomment this line and your path with be updated when using sudo.

Code:
# Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
 
2 members found this post helpful.
Old 05-29-2021, 04:29 PM   #8
fresh_orange_0
LQ Newbie
 
Registered: May 2021
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
Uncomment this line and your path will be updated when using sudo.

Code:
# Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Thanks!
 
Old 05-29-2021, 08:49 PM   #9
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,949

Rep: Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531
When I see post like this I wonder why folks just don't 'su - root'?

Last edited by chrisretusn; 05-30-2021 at 10:55 PM. Reason: Change period to a question mark
 
2 members found this post helpful.
Old 05-29-2021, 09:39 PM   #10
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 914

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
When I see folks buying a Dodge, I wonder why they don't just buy a Ford.
 
3 members found this post helpful.
Old 05-29-2021, 09:50 PM   #11
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,421
Blog Entries: 7

Rep: Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535
Quote:
Originally Posted by chrisretusn View Post
When I see post like this I wonder why folks just don't 'su - root'.
Me too. I'm not a great fan of sudo. If I ever have to do something 'as root', I'll use 'su -' every time.

Thankfully, Slackware's sudo comes with sane default settings.
 
Old 05-29-2021, 09:53 PM   #12
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by chrisretusn View Post
When I see post like this I wonder why folks just don't 'su - root'.
Well, because su - requires the root password. You can set up sudo to not require a password or allow a user to have root access for some programs but not for everything.

I have my sudo set up so my user can run any program and without requiring my user's password. Is this more insecure? Yes. Am I aware of that and still do it? Also yes. Is this much faster for me when needing to do root things? Another yes. Am I a stray from the *buntus that got used to using sudo before switching to Slackware? Nope! I started with Red Hat 20ish years ago and then switched to Slackware. Never used the *buntus for any serious amount of time. I just configure my system the way I like it.

I also sometimes do sudo su - when I need to do more than a few commands as root. *gasp*

(Also, you don't need to specify root when running su. It defaults to the root account unless you specify a different user.)

When I see post like this I wonder why folks just don't let others use their machines as they want to?
 
2 members found this post helpful.
Old 05-29-2021, 10:07 PM   #13
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,421
Blog Entries: 7

Rep: Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535Reputation: 2535
Quote:
Originally Posted by bassmadrigal View Post
When I see post like this I wonder why folks just don't let others use their machines as they want to?
That's a bit of an overreaction. You need to settle down a bit.

He was merely posing a question, not telling people what to do.
 
Old 05-30-2021, 12:26 AM   #14
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,949

Rep: Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531Reputation: 1531
Quote:
Originally Posted by chris.willing View Post
When I see folks buying a Dodge, I wonder why they don't just buy a Ford.
LOL. I wonder the same thing.
 
Old 05-30-2021, 01:05 AM   #15
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by rkelsen View Post
That's a bit of an overreaction. You need to settle down a bit.

He was merely posing a question, not telling people what to do.
I just took their statement and turned it on them. Not an overreaction in my book, but others are free to look at it as they desire. I was not worked up in my post. I posted the reason *I* use sudo and included that I am aware that it is insecure. I was not bothered by anything more than questioning the user's choice to make their system their own.

I have no problems with people using su - and typing their root password, so what's the issue with people setting up sudo to use as they desire? I'm glad Pat does sane defaults with sudo and requires users to set it up manually. Hopefully that ensures users understand the implications of setting it up and are making the decision knowingly.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware 14.2 -Multi- | cannot use installpkg via sudo, user is member of wheel, and wheel option in sudoers is enabled ? endless-rain Slackware 8 08-06-2018 06:01 AM
[SOLVED] User not in sudoers: How to add user? Permtion Denied for sudoers file esgol Linux - Newbie 3 07-13-2012 07:44 AM
how a user can be added to sudoers file. afaheem1988 Linux - Newbie 5 08-10-2008 07:15 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM
I deleted /etc/sudoers and creates a new file call sudoers but now it doesnt for visu abefroman Linux - Software 1 11-10-2005 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration