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 01-08-2008, 01:42 PM   #1
loadrunner
LQ Newbie
 
Registered: Jan 2008
Posts: 1

Rep: Reputation: 0
sudo problem


Hello

I have a question:

Is it normat not to be able to run directly?
Code:
sudo reboot
I can run it only by:
Code:
sudo /sbin/reboot
And I'm not talking only about reboot, I can't run any other applications from /sbin, /usr/sbin ...
I tried on a debian and it works.
Is it any way in which I can make it work in slakware too?
 
Old 01-08-2008, 01:44 PM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
That's because as a normal user /sbin and /usr/sbin are not in your path.
 
Old 01-08-2008, 01:48 PM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
That's right. Debian (if you say so) includes those directories to the $PATH environment variable, and thus the shell looks for the executables from those directories also when you type the name and hit enter. If you like, you can add them to your $PATH via a bashrc (or equivalent) file, and have the same functionality. Or if you like, create aliases for your most used commands.
 
Old 01-08-2008, 04:09 PM   #4
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
I thought the reason those commands wouldn't work was because you have to type exactly what it says in sudoers. I didn't realise it was the path.
 
  


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
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
Sudo Problem Mithic Linux - General 22 12-06-2006 12:10 PM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
problem with sudo mouse46 Linux - Desktop 6 08-24-2006 09:49 AM
Problem with sudo punx120 Linux - Software 0 05-08-2004 10:43 AM

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

All times are GMT -5. The time now is 06:23 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