You are not logged in.
I'm trying to set up a new laptop, but once I set up my user account with sudo the reboot command stopped working.
At first, I got
$ reboot
Failed to set wall message, ignoring: The name org.freedesktop.PolicyKit1 was not provided by any .service files
Failed to reboot system via logind: The name org.freedesktop.PolicyKit1 was not provided by any .service files
Failed to talk to init daemon.which was semi-resolved by installing polkit, as suggested in this thread.
However, after installing polkit, the command hangs and this happens instead:
$ reboot
Failed to set wall message, ignoring: Connection timed out
Failed to reboot system via logind: Method call timed out
Failed to talk to init daemon.Each line hangs separately, the error doesn't show up all at once.
I found this thread on this issue, but I can't quite figure out how they resolved the problem. There isn't any group named "power" by default, nor is it mentioned in the linked article. Furthermore, when I have installed Arch on another machine, none of this happened, despite following the same procedure.
What went wrong?
Last edited by Leafy Greens (2018-03-23 16:19:47)
Explicit um est volumen
(The scroll has been completely unrolled)
Offline
once I set up my user account with sudo the reboot command stopped working.
Please describe exactly what it is you did (the commands you ran, config files you changed, with contents, etc.) and also explain what you mean by "stopped working", which implies "something" used to work, but no longer is?
Offline
Leafy Greens wrote:once I set up my user account with sudo the reboot command stopped working.
Please describe exactly what it is you did (the commands you ran, config files you changed, with contents, etc.) and also explain what you mean by "stopped working", which implies "something" used to work, but no longer is?
I used visudo to give my user account sudo access for all commands with authorization. Sudo works as expected, but for some reason shutdown and reboot seem to require sudo to run; however, instead of giving the standard error about needing to run as root, it gives the error message(s) above.
As for what stopped working, it's the "reboot" command itself. Normally, when you give the command
$ rebootthe machine restarts as normal.
The same problem applies to
$ shutdownexcept that in this case, the machine is only supposed to turn off, not back on. Also, the same problem happens regardless of what flags are used with it.
Explicit um est volumen
(The scroll has been completely unrolled)
Offline
Offline
Please post the contents of your sudoers file.
@slithery just to note Leafy Greens output does not show sudo being used to invoke reboot or shutdown Allow_users_to_shutdown
Offline
Please post the contents of your sudoers file.
## sudoers file.
##
## This file MUST be edited with the 'visudo' command as root.
## Failure to use 'visudo' may result in syntax or file permission errors
## that prevent sudo from running.
##
## See the sudoers man page for the details on how to write a sudoers file.
##
##
## Host alias specification
##
## Groups of machines. These may include host names (optionally with wildcards),
## IP addresses, network managers or netgroups.
# Host_Alias WEBSERVERS = www1, www2, www3
##
## User alias specification
##
## Groups of users. These may consist of user names, uids, Unix groups,
## or netgroups.
# User_Alias ADMINS = millert, dowdy, mikef
##
## Cmnd alias specification
##
## Groups of commands. Often used to group related commands together.
# Cmnd_Alias PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
# /usr/bin/pkill, /usr/bin/top
# Cmnd_Alias REBOOT = /sbin/halt, /sbin/reboot, /sbin/poweroff
##
## Defaults specification
##
## You may wish to keep some of the following environment variables
## when running commands via sudo.
##
## Locale settings
# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
##
## Run X applications through sudo; HOME is used to find the
## .Xauthority file. Note that other programsuse HOME to find
## configuration files and this may lead to privilage escalation!
# Defaults env_keep += "HOME"
##
## X11 resource path settings
# Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
##
## Desktop path settings
# Defaults env_keep += "QTDIR KDEDIR"
##
## Allow sudo-run commands to inherit the callers' ConsoleKit session
# Defaults env_keep += "XDG_SESSION_COOKIE"
##
## Uncomment to enable special input methods. Care should be taken as
## this may allow users to subvert the command being run via sudo.
# Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
##
## Uncomment to use a hard-coded PATH instead of the user's to find commands
# Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
##
## Uncomment to send mail if the user does not enter the correct password.
# Defaults mail_badpass
##
## Uncomment to enable logging of a command's output, except for
## sudoreplay and reboot. Use sudoreplay to play back logged sessions.
# Defaults log_output
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!REBOOT !log_output
Defaults pwfeedback
Defaults timestamp_timeout=-1
##
## Runas alias specification
##
##
## User privilege specification
##
root ALL=(ALL) ALL
[redacted] ALL=(ALL) ALL
## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL) ALL
## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).
# Defaults targetpw # Ask for the password of the target user
# ALL ALL=(ALL) ALL # WARNING: only use this together with 'Defaults targetpw'
## Read drop-in files from /etc/sudoers.d
## (the '#' here does not indicate a comment)
#includedir /etc/sudoers.d
# Reset environment by default
Defaults env_reset
# Set default EDITOR to nano, and do not allow visudo to use EDITOR/VISUAL
Defaults editor=/usr/bin/nano, !env_editorUsername redacted, no I didn't try to name the user "ALL".
Explicit um est volumen
(The scroll has been completely unrolled)
Offline
Slithery wrote:Please post the contents of your sudoers file.
@slithery just to note Leafy Greens output does not show sudo being used to invoke reboot or shutdown Allow_users_to_shutdown
Just tried to replicate the issue, and it seems to have resolved itself. It might have been an issue with the session permissions, as suggested in the article you linked. Marking as solved.
Explicit um est volumen
(The scroll has been completely unrolled)
Offline