Disabling shutdown/reboot for users?

Quillen, Channon CQuillen at txfb-ins.com
Mon Jan 12 15:20:18 UTC 2004


David-

I am forwarding to you, and list, a reply from a list user on Psyche where
before I asked the same question.

-------------------------------------------------------------------
Hi,

Here's the section of our script that disables non-root shutdowns.
There are three parts.
	- gdm.conf - turns off reboots from the gnome login window
	- /etc/pam.d/{reboot,half, poweroff} - turns off reboots from
		inside gnome
	- /etc/inittab - turns off ctrl-alt-delete

Hope this helps,

Cheryl

#!/bin/sh
#
#
# Disable non-root shutdowns
#
# /etc/X11/gdm/gdm.conf
mv /etc/X11/gdm/gdm.conf /etc/X11/gdm/gdm.conf.orig
sed 's!SystemMenu=true!SystemMenu=false!' /etc/X11/gdm/gdm.conf.orig >
/etc/X11/gdm/gdm.conf
chown root:root /etc/X11/gdm/gdm.conf
chmod 644 /etc/X11/gdm/gdm.conf
#
# /etc/pam.d/reboot
mv /etc/pam.d/reboot /etc/pam.d/reboot.orig
sed 's!auth[ 	]*required[ 	]*/lib/security/pam_console.so!#auth
required	/lib/security/pam_console.so!' /etc/pam.d/reboot.orig >
/etc/pam.d/reboot
chown root:root /etc/pam.d/reboot
chmod 644 /etc/pam.d/reboot
#
# /etc/pam.d/halt
mv /etc/pam.d/halt /etc/pam.d/halt.orig
sed 's!auth[ 	]*required[ 	]*/lib/security/pam_console.so!#auth
required	/lib/security/pam_console.so!' /etc/pam.d/halt.orig >
/etc/pam.d/halt
chown root:root /etc/pam.d/halt
chmod 644 /etc/pam.d/halt
#
# /etc/pam.d/poweroff
mv /etc/pam.d/poweroff /etc/pam.d/poweroff.orig
sed 's!auth[ 	]*required[ 	]*/lib/security/pam_console.so!#auth
required	/lib/security/pam_console.so!' /etc/pam.d/poweroff.orig >
/etc/pam.d/poweroff
chown root:root /etc/pam.d/poweroff
chmod 644 /etc/pam.d/poweroff
#
#
# /etc/inittab
mv /etc/inittab /etc/inittab.orig
sed 's!ca::ctrlaltdel:/sbin/shutdown -t3 -r
now!#ca::ctrlaltdel:/sbin/shutdown -t3 -r now!' /etc/inittab.orig >
/etc/inittab
chown root:root /etc/inittab
chmod 644 /etc/inittab

-- 
Cheryl Southard
cld at astro.caltech.edu

-Channon 


-----Original Message-----
From: David Jackson [mailto:trashcan at mustardandrelish.com] 
Sent: Sunday, January 11, 2004 8:36 AM
To: fedora-list at redhat.com
Subject: Disabling shutdown/reboot for users?

Howdy --
How can I disable the shutdown/reboot on the startup menu for standard
users?

And/Or force them to enter the root password (like redhat-config-*)?

TX,
David


-- 
fedora-list mailing list
fedora-list at redhat.com
To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040112/8b4f9ad6/attachment-0001.htm>


More information about the fedora-list mailing list