Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic:  How do I prevent a specific user to switch of the computer?  (Read 2301 times)

Offline vilde

  • User
  • Posts: 708
I have one computer which will autologin a specific user om boot, I want this user not to be able to reboot or switch of the computer, how?

reinob

  • Guest
Re: How do I prevent a specific user to switch of the computer?
« Reply #1 on: 2014/07/29, 10:14:01 »
It depends on which DE you're using. I presume most use PolicyKit, which allows setting what you want. For details you'll have to ask somewhere/someone else.

Have a look here: http://askubuntu.com/questions/93542/how-to-disable-shutdown-reboot-suspend-hibernate

Offline vilde

  • User
  • Posts: 708
Re: How do I prevent a specific user to switch of the computer?
« Reply #2 on: 2014/07/29, 10:39:49 »
@ reinob, I think that is not what I want, I want a specific user XXX not being able to shut down the computer, other users and root shall have all rights. What I thought of is, maybe there is a group that I can remove XXX from, or similar to get what I want.

reinob

  • Guest
Re: How do I prevent a specific user to switch of the computer?
« Reply #3 on: 2014/07/29, 11:26:54 »
@vilde,

I have no experience with PolicyKit, but in the example shown in the link I posted above I *suppose* you'd have to replace:

Identity=unix-user:*

with

Identity=unix-user:my_user

and then it should work. There may be a way to do this with systemd but I don't really know.


Offline vilde

  • User
  • Posts: 708
Re: How do I prevent a specific user to switch of the computer?
« Reply #4 on: 2014/08/01, 13:57:02 »
Thanks for your help reinob, I did it another way. My purpose was really to prevent myself to shut down a specific computer by my old habit to always close my computers when I'm not there. I just toke away program-meny from the panel, that will be enough for me to think an extra time and not switch of the computer when it's not supposed to be shut down.