LinuxQuestions.org
Review your favorite Linux distribution.
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
 
LinkBack Search this Thread
Old 03-01-2010, 05:36 PM   #1
gabrielmagno
LQ Newbie
 
Registered: May 2009
Location: Belo Horizonte, Brasil
Distribution: Slackware
Posts: 24

Rep: Reputation: 1
sudo slackpkg = command not found


I edited my "sudoers" file with "visudo".
Added the line, after the root privileges definition.

Code:
root     ALL=(ALL) ALL
myuser   ALL=(ALL) ALL
I try to:
Code:
$ sudo ls /root
Blah  Blahblah  file.txt
Ok.

But then I try to:
Code:
$ sudo slackpkg
sudo: slackpkg: command not found
With direct root acces it's ok:
Code:
$ sudo su
# slackpkg
....
....
executes normally
....
....
What may be wrong?
 
Old 03-01-2010, 05:38 PM   #2
koenigdavidmj
Member
 
Registered: Oct 2009
Posts: 73

Rep: Reputation: 25
You should have /sbin and /usr/sbin in your normal user path if you want to use sudo. Otherwise a lot of packaging utilities will break.
 
Old 03-01-2010, 05:39 PM   #3
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware, Bluewhite
Posts: 180

Rep: Reputation: 19
Try typing the full path to slackpkg? e.g.: sudo /sbin/slackpkg
 
Old 03-01-2010, 06:30 PM   #4
gabrielmagno
LQ Newbie
 
Registered: May 2009
Location: Belo Horizonte, Brasil
Distribution: Slackware
Posts: 24

Original Poster
Rep: Reputation: 1
$ sudo /usr/sbin/slackpkg
works

What is the most simple way to permanently add "/usr/sbin" to the $PATH variable?
 
Old 03-01-2010, 06:48 PM   #5
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 980

Rep: Reputation: 220Reputation: 220Reputation: 220
add PATH="$PATH:/usr/sbin" to one of your startup files

~/.profile or ~/.bash_login perhaps
 
Old 03-01-2010, 11:17 PM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,080

Rep: Reputation: 230Reputation: 230Reputation: 230
Why don't you just login with 'su -' ? That will give you a proper root login shell with paths etc.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why sudo root command not found? vitalstrike82 Suse/Novell 5 11-07-2007 08:29 PM
sudo: shutdown: command not found ekdya Fedora 2 09-29-2006 04:42 PM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-27-2006 11:57 PM
sudo command not working startproc cmd not found Imajica21 Linux - General 2 04-14-2005 01:22 PM
sudo: readme : command not found vishal.thorat Linux - Security 3 07-17-2003 05:56 PM


All times are GMT -5. The time now is 07:51 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration