Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Fedora This forum is for the discussion of the Fedora Project.


  Search this Thread
Old 10-23-2007, 12:21 AM   #1
LQ Newbie
Registered: Aug 2007
Posts: 6

Rep: Reputation: 0
Disabling shutdown service

Hi..I would like to disable "shutdown" service for a remote machine accessing my machine(logging in as root). This is in fedora core.

Thanks in advance.
Shankar Balakrishnan
Old 10-24-2007, 03:24 PM   #2
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
Fedora Core # what?

I don't think you can easily or selectively strip the root acct. of its normal power(s) based on remote log-in. If I'm wrong, I'll be very happy to hear how it's done.
Old 10-25-2007, 03:40 AM   #3
LQ Newbie
Registered: Aug 2007
Posts: 6

Original Poster
Rep: Reputation: 0

This is in fedora core 6.
Old 10-26-2007, 02:02 AM   #4
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971Reputation: 1971
nothing to do with networking. please think twice about what forum you post in. moved to Fedora.
Old 10-26-2007, 10:28 AM   #5
Registered: Oct 2007
Distribution: OSX
Posts: 248

Rep: Reputation: 31
Only thing that comes to mind is a wrapper script for /sbin/shutdown which checks if root is logged in on console or via pts/[0-9]. Other than that I don't see how you could disable it for root just b/c that user is logged in remotely.

Why not just have the person logging in remotely use a regular account and give him "sudo" access to only certain commands. That way he/she has root access to certain things but not everything. Please google "sudo" if you're not familiar with it. Fedora has it installed by default as far as I remember. If not do a "yum install sudo" without quotes from a terminal window.

By the way, /sbin/shutdown is a binary so you can't open it with an editor. You could run a "strace /sbin/shutdown" and see what system calls it makes. IE: which files it opens which you could then place the appropriate "remote login" check in there. I believe it goes through the list in /etc/rc5.d/K**somescriptname where ** is a two digit number. My first shutdown script in there is "K01smolt". You could place a little code at the top of your first shutdown script to run this check, if logged in remotely, kill the shutdown process. Would be tricky


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
disabling all the Xinetd services by default without editing seperate service kskkumar SUSE / openSUSE 1 06-06-2007 04:33 PM
Disabling the Windbind service. dougnc SUSE / openSUSE 2 01-29-2007 06:57 PM
disabling shutdown? kj6loh Fedora 4 02-21-2006 02:27 AM
Installed Software in Slackware 9.1 and disabling network service odin123 Slackware 5 10-25-2003 12:24 AM
Disabling system shutdown from XDM logon sangjin Linux - Security 5 08-25-2003 11:31 PM

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