LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 07-13-2004, 10:13 AM   #1
johnnygun
LQ Newbie
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4

Rep: Reputation: 0
Question Is it ok to create links between /usr/sbin and /bin binaries?


I normally use my slackware 9.0 box logged in as a normal user (ie; not root). I recently installed hping after executing an SU so that I could be the root user installing hping. I want to be able to use this program as a normally logged in user not root. However, the binary was installed in /usr/sbin thus making it available to root only. So I decided to create a symbolic link to this binary file from my /bin directory. Were there other methods I overlooked to accomplish the same thing? Any considerations?

Thank you and Regards
 
Old 07-13-2004, 10:46 AM   #2
fluppi
Member
 
Registered: Oct 2003
Location: Switzerland (Europe)
Distribution: OpenSuSE, RedHat, Knoppix, IRIX + MacOSX
Posts: 198

Rep: Reputation: 30
Just linking will not work (and it's ugly too), but how about sudo ?
 
Old 07-13-2004, 12:50 PM   #3
netmask
Member
 
Registered: Jul 2004
Location: Sherbrooke, Quebec, Canada, North America, World, Milky Way
Distribution: Gentoo
Posts: 103

Rep: Reputation: 15
As far as I know.. the only reason it wouldn't work is because normal users don't have "/usr/sbin" in their $PATH.

I know normal users can execute "ifconfig" if the sbin directory is in their $PATH
 
Old 07-13-2004, 04:57 PM   #4
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
Quote:
Originally posted by fluppi
Just linking will not work (and it's ugly too), but how about sudo ?
sudo is definaltly your answer here.
 
Old 07-13-2004, 05:19 PM   #5
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
Well, first see if your user has permissions to execute it --

/sbin/hping

If it works, then you can move it to the /bin or /usr/bin directory to have it in everyone's path.
There's really no reason to symlink it, and no reason to restrict access to root. Sudo would be an option, but I don't see how it's necessary. Simply mv it from one to the other.

--Shade
 
Old 07-14-2004, 03:09 AM   #6
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
I always add my default user to the 'wheel' group and then run visudo and give members of 'wheel' permission to run all commands(with or without password). You'll still have to give the full path in order to run stuff that's not in the users path, though. This is the easiest way to give yout own default user a little extra 'power' without having to run as root or 'sudo' each time.
 
  


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
path in services wrong for clamav updated frm 0.75 to 0.80 usr/bin vs usr/local/bin Emmanuel_uk Linux - Newbie 3 04-22-2005 02:02 AM
/usr/bin/X11/ and /usr/X11R6/bin/ the same? linuxtesting2 Linux - Newbie 2 11-16-2004 11:57 AM
/usr/sbin and /sbin world read/executable... why? lazlow69 Slackware 3 04-29-2004 06:06 PM
As root, not seeing /sbin and /usr/sbin in path weghman Linux - Newbie 3 04-25-2004 02:06 PM
list of programs in /usr/bin, /sbin, etc. punt Linux - General 1 07-31-2001 05:19 PM


All times are GMT -5. The time now is 03:30 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration