How do I prevent a specific user to switch of the computer?

Started by vilde, 2014/07/27, 01:10:37

Previous topic - Next topic

vilde

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

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

vilde

@ 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

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


vilde

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.