LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-02-2018, 12:37 PM   #1
Altoid
Member
 
Registered: Oct 2016
Location: Southern Hemisphere
Distribution: Devuan
Posts: 106

Rep: Reputation: Disabled
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.

Last edited by Altoid; 09-02-2018 at 12:39 PM. Reason: Clearer title for thread
 
Old 09-03-2018, 05:38 AM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,289

Rep: Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409
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.
 
Old 09-03-2018, 07:48 AM   #3
Altoid
Member
 
Registered: Oct 2016
Location: Southern Hemisphere
Distribution: Devuan
Posts: 106

Original Poster
Rep: Reputation: Disabled
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.
 
Old 09-03-2018, 05:40 PM   #4
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,289

Rep: Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409
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.....
 
Old 09-03-2018, 06:20 PM   #5
Altoid
Member
 
Registered: Oct 2016
Location: Southern Hemisphere
Distribution: Devuan
Posts: 106

Original Poster
Rep: Reputation: Disabled
Hello:
Quote:
Originally Posted by wpeckham View Post
... 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 View Post
... 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 View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Service won't start on boot sarahlizy Red Hat 7 05-21-2013 10:40 AM
service won't start at boot jgonsalves Linux - Newbie 9 05-26-2010 08:42 AM
rdisc service won't start...PLEASE HELP!!!! wesley.bruwer Linux - Networking 2 12-12-2008 12:09 AM
httpd service won't start GavB Linux - Newbie 4 01-19-2007 07:56 AM
sendmail service won't start tisource Linux - Networking 1 10-04-2002 05:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration