View Issue Details

IDProjectCategoryView StatusLast Update
0007709Kali LinuxGeneral Bugpublic2022-05-20 10:54
Reportersteev Assigned Todaniruiz  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version2022.2 
Summary0007709: Running systemctl enable or systemctl disable on a non-systemd unit fails
Description

While testing for the 2022.2 release, one issue found is that running

systemctl disable ssh

will prompt you for a password, however, it doesn't pass the elevated privileges to update-rc.d and results in a Permission denied error from update-rc.d

This worked previously, but doesn't now, a workaround exists in just using sudo systemctl disable ssh

Noticed on the arm images where we enable ssh by default, this happens on all architectures.

kali@kali:~$ systemctl enable ssh
Synchronizing state of ssh.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ssh
update-rc.d: error: Permission denied

Steps To Reproduce
  1. Launch a terminal
  2. Run systemctl enable ssh or systemctl disable ssh
Additional Information

This worked in previous releases, and probably needs to be submitted to Debian as I don't believe it's a change we made.

Activities

daniruiz

daniruiz

2022-05-20 10:53

manager   ~0016178

This is not new in kali 2022.2, it has always been this way

You should run systemctl enable/disable with sudo instead. If you don't add sudo it will open a password dialog and try to run it with polkit, but that doesn't work with systemctl enable/disable.
For some reason it does work with systemctl start/stop.

Here is the bugreport in systemd https://github.com/systemd/systemd/issues/4957

Issue History

Date Modified Username Field Change
2022-05-14 18:44 steev New Issue
2022-05-20 10:53 daniruiz Note Added: 0016178
2022-05-20 10:54 daniruiz Assigned To => daniruiz
2022-05-20 10:54 daniruiz Status new => closed
2022-05-20 10:54 daniruiz Resolution open => no change required