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 11-16-2003, 09:43 AM   #1
Kjetil4455
Member
 
Registered: Jul 2003
Location: Norway/Drammen
Distribution: Slackware~
Posts: 250

Rep: Reputation: 30
Question how to share a command with other users?


I want my other user to be able to shutdown without having to do the "su -" command all the time. is that possible?
 
Old 11-16-2003, 07:39 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,985

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
As root run:

# chmod 755 /sbin/shutdown

Then an ordinary user should be able to shutdown with:

$ /sbin/shutdown -h now

Or if they don't want to type the "sbin" first, create a link in /usr/bin to it like so:

# ln -s /sbin/shutdown /usr/bin/shutdown

Then all they need to do is run:

$ shutdown -h now
 
Old 11-16-2003, 09:21 PM   #3
Lagg
Member
 
Registered: Jul 2003
Distribution: Slackware
Posts: 67

Rep: Reputation: 15
my answer........ stolen!

note: I like to use "telinit 0" instead if /sbin/shutdown.


(does same thing).
 
Old 11-17-2003, 09:19 AM   #4
Noryungi
Member
 
Registered: Jul 2003
Location: --> X <-- You are here.
Distribution: Slackware, OpenBSD
Posts: 305

Rep: Reputation: 53
Configure the one command ("shutdown") in the file "/etc/sudoers" for every user. This way, your users will be able to access this command through sudo without knowing the root password and without modifying the rights to the binary. This has several advantages.

Check the following for more information on how to do this:
http://www.onlamp.com/pub/a/bsd/2002...y_Daemons.html
http://www.onlamp.com/pub/a/bsd/2002...y_Daemons.html

(these two are for FreeBSD, but Slackware is almost the same)
 
  


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
how to share folder with users salahuddin_66 Linux - General 4 08-11-2004 10:43 AM
Multiple users mounting NFS share Vincent_Vega Linux - Networking 4 08-01-2004 10:04 AM
[FC2]Why does the users command display multiple users? Harkov Fedora 1 07-10-2004 09:24 PM
trying to share folder between 2 users aymbpc Linux - Newbie 6 09-22-2003 07:04 PM
samba file share with windows users Peds222 Linux - Software 6 08-22-2003 12:07 PM

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

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