Description of problem: Shutdow with a TIME parameter fails, and immediately shuts down the system. Version-Release number of selected component (if applicable): NAME=Fedora VERSION="23 (Workstation Edition)" How reproducible: Always, no specific condition required. Steps to Reproduce: 1. Open gnome-terminal 2. type 'sudo shutdown -h 1:30' (or any future timestamp) 3. shutdown prints an error message and imediately shuts down the system, not respecting the given TIME argument. Actual results: Shuts down computeri mmediately, closing applications in use, ignoring the TIME argument. Expected results: Shuts down computer at TIME o'clock. Additional info: (1) I've typed "sudo shutdown -h 1:30 2> shutdown_output.txt" to recover the error message after a system halt, and it says: "Failed to call ScheduleShutdown in logind, proceeding with immediate shutdown: Access denied" (2) Systemd version: $ rpm -qa systemd systemd-222-8.fc23.x86_64 (3) It was working fine on Fedora 22, 21, 20.
Well, I'm not sure if systemd is causing this issue alone. Because of new SELinux policies, I needed to set it to permissive mode. Doing so, shutdown with a TIME parameter now works (it stop working if I set SELinux again to enforcing). Now I'm really confuse about what is really causing shutdown to fail. Please, see more at https://bugzilla.redhat.com/show_bug.cgi?id=1277987
I've always run shutdown as root and I've kept SELinux in enforcing mode. After upgrading to F23 and trying to schedule a shutdown, I got no SELinux alerts in my logs, but the system does shut down immediately.
I was wrong, it was right there in the logs, but I missed it the first time: Nov 08 05:54:10 <hostname> audit[965]: AVC avc: denied { create } for pid=965 comm="systemd-logind" name=".#scheduledCcLX9o" scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:init_var_run_t:s0 tclass=file permissive=0 Nov 08 05:54:10 <hostname> systemd-logind[965]: Failed to save information about scheduled shutdowns: Permission denied Nov 08 05:54:10 <hostname> audit[965]: SYSCALL arch=c000003e syscall=2 success=no exit=-13 a0=55ee8983b1f0 a1=800c2 a2=180 a3=0 items=0 ppid=1 pid=965 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="systemd-logind" exe="/usr/lib/systemd/systemd-logind" subj=system_u:system_r:systemd_logind_t:s0 key=(null) Nov 08 05:54:10 <hostname> audit: PROCTITLE proctitle="/usr/lib/systemd/systemd-logind" Nov 08 05:54:10 <hostname> dbus[990]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper) Nov 08 05:54:10 <hostname> polkitd[1141]: Registered Authentication Agent for unix-process:5454:26150 (system bus name :1.105 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8) Nov 08 05:54:10 <hostname> systemd[1]: Stopping Daemon for power management... Nov 08 05:54:10 <hostname> systemd[1]: Stopped target Graphical Interface. Nov 08 05:54:10 <hostname> systemd[1]: Stopping Graphical Interface.
I can't reproduce this issue with the latest updates. Could you please verify? $ rpm -q systemd selinux-policy systemd-222-8.fc23.x86_64 selinux-policy-3.13.1-155.fc23.noarch
Hello. It seems to be fixed now. I can't reproduce this issue anymore. $ rpm -q systemd selinux-policy systemd-222-8.fc23.x86_64 selinux-policy-3.13.1-155.fc23.noarch Thanks!
See bug #1287592 for the related part.