RE: Disable Shutdown and Reboot from the login screen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: RE: Disable Shutdown and Reboot from the login screen

Many thanks!  That is exactly what I needed.
-Channon

-----Original Message-----
From: Cheryl L. Southard [mailto:cld@xxxxxxxxxxxxxxxxx]
Sent: Thursday, April 10, 2003 10:17 AM
To: psyche-list@xxxxxxxxxx
Subject: Re: Disable Shutdown and Reboot from the login screen

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@xxxxxxxxxxxxxxxxx



--
Psyche-list mailing list
Psyche-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/psyche-list


[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux