Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 11-16-2003, 10:43 AM   #1
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, 08:39 PM   #2
Senior Member
Registered: Oct 2003
Posts: 2,575

Rep: Reputation: 220Reputation: 220Reputation: 220
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, 10:21 PM   #3
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, 10:19 AM   #4
Registered: Jul 2003
Location: --> X <-- You are here.
Distribution: Slackware, OpenBSD
Posts: 292

Rep: Reputation: 46
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:

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


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

All times are GMT -5. The time now is 11:56 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration