LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Devuan ASCII: Service/s won't start (https://www.linuxquestions.org/questions/linux-software-2/devuan-ascii-service-s-wont-start-4175637647/)

Altoid 09-02-2018 12:37 PM

Devuan ASCII: Service/s won't start
 
Hello:

I run a fully up-to-date Devuan ASCII installation.
Desktop environment is Xfce 4.12 with xfwm4 Window Manager.

Code:

groucho@devuan:~$ uname -ap
Linux devuan 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux
groucho@devuan:~$

I'm having an issue with the starting of services: they will not start.

eg:
I've ticked them in Applications -> System -> Services = [service], a pop-up for systemtoolsbackends.set asks me to authenticate and I type my root PW in.

Then I click Close but for some reason they won't start.

The services are checkroot-bootclean.sh, smartmontools and sudo.

So I try to start them from a TTY (showing just two for brevity's sake)

1. Check they are not already running:
Code:

[root@devuan groucho]# service --status-all | grep sudo
 [ ? ]  alsa-utils
 [ ? ]  cryptdisks
 [ ? ]  cryptdisks-early
 [ ? ]  hwclock.sh
 [ ? ]  kmod
 [ ? ]  networking
 [ - ]  sudo
[root@devuan groucho]# service --status-all | grep smartmontools
 [ ? ]  alsa-utils
 [ ? ]  cryptdisks
 [ ? ]  cryptdisks-early
 [ ? ]  hwclock.sh
 [ ? ]  kmod
 [ ? ]  networking
 [ - ]  smartmontools
[root@devuan groucho]#

2. Start them as root:
Code:

[root@devuan groucho]# service sudo start
[root@devuan groucho]# service smartmontools start

3. Check if they have started:
Code:

[root@devuan groucho]# service --status-all | grep sudo
 [ ? ]  alsa-utils
 [ ? ]  cryptdisks
 [ ? ]  cryptdisks-early
 [ ? ]  hwclock.sh
 [ ? ]  kmod
 [ ? ]  networking
 [ - ]  sudo
[root@devuan groucho]# service --status-all | grep smartmontools
 [ ? ]  alsa-utils
 [ ? ]  cryptdisks
 [ ? ]  cryptdisks-early
 [ ? ]  hwclock.sh
 [ ? ]  kmod
 [ ? ]  networking
 [ - ]  smartmontools
[root@devuan groucho]#

As you can see, there's no complaints from the OS WRT my credentials or authentication.

FYI, my installation uses 'su' to get root and my user is included in the 'sudo' group.
Code:

[root@devuan groucho]# cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root        ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo        ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
[root@devuan groucho]#

Code:

groucho@devuan:~$ groups
groucho adm dialout cdrom floppy tape sudo audio dip video plugdev netdev lpadmin scanner
groucho@devuan:~$

So, I can sudo shutdown, sudo reboot, etc. as permitted by /etc/sudoers.d/user_shutdown.

Code:

[root@devuan groucho]# cat /etc/sudoers.d/user_shutdown
groucho ALL= NOPASSWD: /usr/sbin/pm-suspend, /usr/sbin/pm-hibernate, /sbin/halt, /sbin/reboot
[root@devuan groucho]#

I can also generate a properly written (yay!) '/etc/sudoers.d/' file which will enable me to use 'sudo' for running anything (within very strict boundaries) that may I need to run and requires adm privileges.

eg: tested running LinSSID
Code:

[root@devuan groucho]# cat /etc/sudoers.d/user_linssid
%groucho ALL=(ALL) NOPASSWD:/usr/bin/linssid
[root@devuan groucho]#

So it does not seem to be an authorization issue.(?)

I was wondering if anyone using the same DE hs seen this happen or has any idea as to what could be happening with 'services'?

Thanks in advance,

A.

wpeckham 09-03-2018 05:38 AM

I am not running an instance of Devuan and have not since it was new (tried it then, and liked it but have not had a need for it since).


Still, to my knowledge sudo is not a service. I have always used it as an on-demand facility, not as a service. I cannot imagine what advantage there might be in running it as a service. Can you point me to a link?

As for smartmontools, quoting the page of origin for the package
Quote:

The smartmontools package contains two utility programs (smartctl and smartd) to control and monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (SMART) built into most modern ATA/SATA, SCSI/SAS and NVMe disks. In many cases, these utilities will provide advanced warning of disk degradation and failure. Smartmontools was originally derived from the Linux ​smartsuite
You would seem to be trying to start a service using a package name, you need to be using the service name or executable name. In this case I think you want "smartd". I could easily be wrong here, as I do NOT have that distribution currently running.

Since Devuan uses the traditional/classical service definitions, you can easily check the start up script in the rc.d structure for the service control files to be certain. That is where I would start.

Altoid 09-03-2018 07:48 AM

Hello:
Quote:

Originally Posted by wpeckham
... to my knowledge sudo is not a service.

Code:

groucho@devuan:~$ cat /etc/init.d/sudo
#! /bin/sh

### BEGIN INIT INFO
# Provides:          sudo
# Required-Start:    $local_fs $remote_fs
# Required-Stop:
# X-Start-Before:    rmnologin
# Default-Start:    2 3 4 5
# Default-Stop:
# Short-Description: Provide limited super user privileges to specific users
# Description: Provide limited super user privileges to specific users.
### END INIT INFO

. /lib/lsb/init-functions

N=/etc/init.d/sudo

set -e

case "$1" in
  start)
        # make sure privileges don't persist across reboots      <<--- this is what sudo service does
        if [ -d /var/lib/sudo ]
        then
                find /var/lib/sudo -exec touch -d @0 '{}' \;
        fi
        ;;
  stop|reload|restart|force-reload|status)
        ;;
  *)
        echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
        exit 1
        ;;
esac

exit 0
groucho@devuan:~$

Quote:

Originally Posted by wpeckham
Can you point me to a link?

Quote:

Originally Posted by wpeckham
... seem to be trying to start a service using a package name ...

I am first attempting to run it with the graphical interface.

Quote:

Originally Posted by OP
eg:
I've ticked them in Applications -> System -> Services = [service], a pop-up for systemtoolsbackends.set asks me to authenticate and I type my root PW in.

As that did not work, I tried as root from a terminal.
I get no errors or feedback (start: unrecognized service or su: Authentication failure).

The service/s simply do not start.

Thank you for your input.

Cheers,

A.

wpeckham 09-03-2018 05:40 PM

OK, well that is clear enough. That script does NOT start a service. It starts a script that clears the sudoers cache and exits. It is just a script to clean up after sudo on boot, and it does not remain in memory.

Unless you want, for some reason, to clean up the sudo cache some OTHER time than on boot, there should never be a reason to start it. If you do, it will just run and exit: as intended. The behavior you see is EXACTLY what you should expect.

Now then (if you will excuse the temporal ambiguity), about the smartmontools script.....

Altoid 09-03-2018 06:20 PM

Hello:
Quote:

Originally Posted by wpeckham (Post 5899583)
... clear enough.
... does NOT start a service.
... starts a script that clears the sudoers cache and exits.

I see ...
That is why I don't see it running when I query the service status:

Code:

[root@devuan Desktop]# service --status-all | grep sudo
 [ ? ]  alsa-utils
 [ ? ]  cryptdisks
 [ ? ]  cryptdisks-early
 [ ? ]  hwclock.sh
 [ ? ]  kmod
 [ ? ]  networking
 [ - ]  sudo
[root@devuan Desktop]#

Thank you for explaining this to me.
It is rather confusing that it is listed as a 'service'.

Quote:

Originally Posted by wpeckham (Post 5899583)
... for some reason, to clean up the sudo cache some OTHER time than on boot ...

No. I just don't want the sudo cache to survive a reboot.

Quote:

Originally Posted by wpeckham (Post 5899583)
Now then (if you will excuse the temporal ambiguity) ...

Of course.
I have quite a bit of reading up to do. =-)

Thank you very much for your input.

Cheers,

A.


All times are GMT -5. The time now is 07:37 AM.