You are not logged in.
Hi Archers!
I'm trying to get pm-hibernate to execute without password.
There's a (deprecated) guide here: https://wiki.archlinux.org/index.php/pm … gular_user
...suggesting adding pm-hibernate into sudoers:
username ALL = NOPASSWD: /usr/sbin/pm-hibernatebut it doesn't seem to work, and it also says the section is deprecated.
I know pm-suspend is now no longer necessary, because you can successfully suspend with systemctl, but pm-hibernate is still necessary to hibernate according to the wiki.
Furthermore pm-hibernate is now in /usr/bin, not sbin, which is just a symlink. So would that even work, theoretically, to reference a symlink in sudoers and not have it ask for password for what the symlink points to? It needs to be a hard link, doesn't it? Anyway I tried setting it to its hard link path instead too, and it still requested a password.
Another suggestion would be adding myself to the "power" group, maybe?, but I'm pretty sure that's deprecated with systemd too, and it's not recommended to add oneself to that group.
So my question is, how to get pm-hibernate to execute without a password these days?
Since it used to work I'm guessing it may be because something changed in relation to systemd? Maybe pm-hibernate calls something systemd-related which is now requesting the password, and not pm-hibernate itself? Or is that wrong?
Last edited by Biowaste (2014-06-06 21:10:58)
Offline
Nevermind! Found out pm-hibernate is simply also a symlink, pointing to
/usr/lib/pm-utils/bin/pm-actionSo adding the following to sudoers fixed it:
username ALL=NOPASSWD: /usr/lib/pm-utils/bin/pm-actionOffline
Nevermind that nevermind. It still requires a password.
Offline
Do not know if this is identical to pm-hibernate but
$ systemctl hibernatewill only prompt for a password if multiple users are logged in and it is not being run as root
Offline
Well this wiki page says:
Warning: You must not use the systemd hook, because it does not support resuming from hibernation. See FS#37028 for details.
Which is why I'm using pm-hibernate.
Offline
Well this wiki page says:
Warning: You must not use the systemd hook, because it does not support resuming from hibernation. See FS#37028 for details.
Which is why I'm using pm-hibernate.
The systemd hook refers to the HOOKS line of
/etc/mkinitcpio.confNot the whole of systemd from the wiki page you reference if you were using the systemd hook resuming would not work at all so I assume its not in your hooks line and that bug should not occur.
Last edited by loqs (2014-05-23 15:41:19)
Offline