VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: Disable "restart" and "shutdown"  (Read 2477 times)

tbrown

  • Member
  • *
  • Posts: 15
Disable "restart" and "shutdown"
« on: October 10, 2007, 06:54:54 pm »

Free Geek Michiana has configured LTSP to run on VL 5.8 Standard. We want to disable the "restart" and "shutdown" options in the XFCE End Session window. This will leave just one option, Log Out. The goal is to prevent any user, other than root, from shutting down the server from an LTSP workstation desktop.

~/.config/xfce4/desktop/menu.xml contains the following line:

    <builtin name="Quit" cmd="quit" icon="gnome-logout" />

When I search for a binary or script called "quit", I find none. I ran updatedb before trying to "locate" the file.

How then do I disable the restart and shutdown buttons for users?

Tom
Logged

lagagnon

  • Global Moderator
  • Vectorian
  • *****
  • Posts: 1922
Re: Disable "restart" and "shutdown"
« Reply #1 on: October 10, 2007, 07:11:51 pm »

Read this:
http://wiki.xfce.org/kiosk_mode

You need to add a /etc/xdg/xfce4/kiosk/kioskrc file with the relevant bits you want only certain users to do.
Logged
"As people become more intelligent they care less for preachers and more for teachers". Robert G. Ingersoll

uelsk8s

  • Administrator
  • Vectorian
  • *****
  • Posts: 2504
Re: Disable "restart" and "shutdown"
« Reply #2 on: October 10, 2007, 07:26:54 pm »

you can also disable them from /etc/sudoers

find this line
Code: [Select]
%users          ALL=NOPASSWD:SHUTDOWN,DIAL,SERVER,HW1,MOUNT1,SGMAP,PDMOUNT,SMBMOUNT,WIFI
and remove the SHUTDOWN and everything else you dont want them todo

HTH,
Uelsk8s
Logged

tbrown

  • Member
  • *
  • Posts: 15
Re: Disable "restart" and "shutdown"
« Reply #3 on: October 11, 2007, 07:13:18 am »

The kiosk method requires a bit of work, but looks promising. The sudoers edit is simple and worked the first time. It is the Lazy Geek's hack. Problem solved.

Thanks for the rapid replies.

Tom
Logged

Tigerwolf

  • Vectorite
  • ***
  • Posts: 152
Re: Disable "restart" and "shutdown"
« Reply #4 on: October 14, 2007, 03:54:53 pm »

The kiosk method requires a bit of work, but looks promising. The sudoers edit is simple and worked the first time. It is the Lazy Geek's hack. Problem solved.

Kiosk mode has the benefit of also preventing selected users from changing menus around.

You may also want to disable the ctl-alt-escape which kills the X  server for non-root users.

You can do this in xfce-setting-show under 'keyboard' and the 'shortcuts' tab.

Logged
=^_^=  Tigerwolf

Running: Vector Linux 5.8 Standard   12-16-2006