LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-08-2012, 02:51 PM   #1
notinasia
LQ Newbie
 
Registered: May 2012
Posts: 4

Rep: Reputation: Disabled
adduser/ using pkgtool and installpkg


Hello all,

I am a new slackware user. I was using slackware as root yesterday and had no problem using pkgtool from the console (I typed in pkgtool and the pkgtool gui opened up). Today, I used adduser with default settings to make a new user for running wine. When I tried installpkg with the wine package though, I got:

Code:
installpkg wine-1.5.3.x86_64-lsg.txz
installpkg: command not found
Then again when I tried pkgtool:

Code:
pkgtool
pkgtool: command not found
Am I doing something wrong? Maybe this has something to do with how I setup the new user with adduser
 
Old 05-08-2012, 02:55 PM   #2
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
Run the command as root.

installpkg is located in /sbin. This is is root's path but not normally in a user's account path.
 
Old 05-08-2012, 02:55 PM   #3
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
Were you trying to use pkgtool & installpkg as your new user? Try as root:
Code:
su -
then:
Code:
pkgtool
or:
Code:
installpkg whatever
 
Old 05-08-2012, 03:09 PM   #4
notinasia
LQ Newbie
 
Registered: May 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you both. So I tried it again with sudo and I'm wondering if I setup my new user incorrectly.

Code:
sudo root pkgtool
(enter password)
(username) is not in the sudoers file. This incident will be reported
 
Old 05-08-2012, 03:11 PM   #5
notinasia
LQ Newbie
 
Registered: May 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Brian, I tried:

Code:
su root
pkgtool
and it worked.
 
Old 05-08-2012, 03:15 PM   #6
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
Hi. brianL suggested you change to root by typing the su command followed by a hyphen. That will work.

I don't use sudo so I can't tell you which file to edit to place the user name in. But, as a learning experience you can find out yourself. Type "man sudo" and it will probably tell you which file to edit (as root). Files related to the command are normally listed at the bottom of the man page.

Normally a configuration file gives you all the details you need to edit that file. If not then additional information is often found in chapter 5 ... use the command "man 5 configfilename" to get details on the format of the file.

Last edited by TracyTiger; 05-08-2012 at 03:24 PM. Reason: Added more info
 
Old 05-08-2012, 03:28 PM   #7
notinasia
LQ Newbie
 
Registered: May 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
I found a tutorial for enabling sudo (modifying sudoer) for my non-root user: http://www.insidesocal.com/click/200...-and-easy.html
 
Old 05-08-2012, 03:30 PM   #8
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, CentOS, OpenBSD, FreeBSD
Posts: 530

Rep: Reputation: Disabled
Well your user is part of the "wheel" group for sure since you can "su root" (although you only need 'su' by itself).

However, your user doesn't seem to be in the /etc/sudoers file which you'll have to edit via "visudo."

I would read:
Code:
man sudoers
Before you attempt to edit it without knowing what to do. I also recommend some Google searching for the sudoers settings. But it seems like you're just going to want to allow your user to run pkgtool and installpkg.
 
Old 05-08-2012, 03:36 PM   #9
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
I've never bothered setting up sudo, never thought it was necessary.
 
Old 05-08-2012, 03:40 PM   #10
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, CentOS, OpenBSD, FreeBSD
Posts: 530

Rep: Reputation: Disabled
I've only set it up on computers that are going to be accessed by other people. I've never set it up on my personal computer either since I generally don't like typing "sudo" for every little thing I need root permissions for.
 
Old 05-08-2012, 03:50 PM   #11
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
Quote:
Originally Posted by TommyC7 View Post
Well your user is part of the "wheel" group for sure since you can "su root"
Hi TommyC7 !

I don't believe that Slack (or Linux?) requires membership in the wheel group for a user to become root. A quick look in /etc/group doesn't show my user in that group and my user account can use the su command successfully.

In another life, in a previous decade, on a UNIX system, I remember wheel membership being a requirement. It's probably still a requirement on other *nix distributions today.

If I'm wrong please correct me. I'm always learning but don't want to leave incorrect information out there to be picked up by others.
 
Old 05-08-2012, 03:57 PM   #12
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
I'm not in the wheel group, in fact there is no wheel group by default on my system, but I can use su root or su -.

EDIT
I was wrong, there is a wheel group. Must get my eyes tested.

Last edited by brianL; 05-08-2012 at 04:20 PM.
 
Old 05-08-2012, 03:59 PM   #13
yars
Member
 
Registered: Apr 2012
Location: Russia
Distribution: Slackware64-current
Posts: 249

Rep: Reputation: 24
I don't use sudo, I use only su. I think, using the sudo will decrease the security.
 
Old 05-10-2012, 01:52 AM   #14
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware
Posts: 572

Rep: Reputation: 154Reputation: 154
I use sudo a lot because I save time writing the password:

$ sudo su -
# whoami
root

of course there are security issues with sudo.
 
Old 05-10-2012, 07:13 AM   #15
shrourdian
LQ Newbie
 
Registered: Apr 2012
Location: indonesia
Distribution: on the way to slackware
Posts: 8

Rep: Reputation: Disabled
by default slackware's SU_WHEEL_ONLY option in /etc/login.defs is set to "no",
that makes non wheel group enable to su into root
 
  


Reply



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
installpkg demonfist Slackware 1 06-30-2006 05:44 AM
installpkg va3dxs Slackware 10 04-11-2006 07:11 PM
something about installpkg tintilin Slackware 5 11-26-2004 12:13 AM
Not sure about installpkg Superdude Linux - Software 8 01-04-2004 05:30 PM
help with installpkg mep]-[isto Slackware 3 11-19-2003 02:27 PM

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

All times are GMT -5. The time now is 10:06 AM.

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