WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ntp user missing  (Read 7997 times)

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
ntp user missing
« on: February 25, 2019, 02:56:29 AM »
Hi
I've imported/loaded the ntp package, but....
Code: [Select]
jls@box:~$ sudo /etc/init.d/ntp start
 * Starting NTP server ntpd
 * user "ntp" does not exist

thanks
dCore user

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: ntp user missing
« Reply #1 on: February 25, 2019, 03:57:47 AM »
Ok, I will look into it today.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: ntp user missing
« Reply #2 on: February 25, 2019, 07:46:37 PM »
On dCore-stretch, with a "base norestore" boot code, ntp needs the /run/lock directory already existing.  As well as the getent and flock commands from libc-bin and util-linux, respectively.  I have added a startup script for ntp to create /run/lock if not existing, as well as adding libc-bin and util-linux to the deps of ntp.

I will create the /run/lock directory in the base of the dCore ports

 

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: ntp user missing
« Reply #3 on: February 25, 2019, 11:35:06 PM »
Hi
Thanks Jason for the startup script, but I still get the same error about the non existing user.
Regards
dCore user

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: ntp user missing
« Reply #4 on: February 26, 2019, 02:10:09 AM »
Hi.  Could you re-import ntp and try again?  I had added one more dependency after I posted to make it work on dCore-stretch that I missed. 

If that does not work, which dCore are you using?

Thanks. 

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: ntp user missing
« Reply #5 on: February 26, 2019, 09:20:25 AM »
Hi
I've reimported it and I still get:
Code: [Select]
jls@pc1:~$ sudo /etc/init.d/ntp start
 * Starting NTP server ntpd
 * user "ntp" does not exist
jls@pc1:~$
I'm using bionic
dCore user

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: ntp user missing
« Reply #6 on: February 26, 2019, 06:38:25 PM »
Ok, I tested first "norestore" bootcode with only wireless and related kernel module SCEs installed, and wireless contained packages that are needed for ntp to function.  I now tested with ethernet and "base norestore" bootcodes, and have added the needed deps that were missing, and also fixed some deps of dependency packages. 

Thanks for testing, it should be good now.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: ntp user missing
« Reply #7 on: February 27, 2019, 12:13:43 AM »
Hi
Still same error
I don't understand the link between a user missing and a dep missing
dCore user

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: ntp user missing
« Reply #8 on: February 27, 2019, 02:59:20 AM »
The deps are so the adduser command will work when the startup script of ntp is run.

I used a USB install of both dCore-stretch and dCore-bionic just now, made with dCore-usbinstall, with no backup so the same as booting with "base norestore".  Also there are no other SCEs being loaded.  Then issued the below commands:

sce-import ntp
sce-load ntp
sudo /etc/init.d/ntp start

And it started ntp as expected.  Make sure you don't have /etc/group or /etc/shadow in your backup as during boot it will overwrite the added ntp user with those files that don't have the ntp user or group if ntp is being loaded during boot.

 

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: ntp user missing
« Reply #9 on: February 27, 2019, 07:34:48 AM »
Hi
if ntp is onboot it doesn't work, if loaded when the system is already up it works.
If placed onboot,:
After  executing
sudo /usr/local/tce.installed/ntp
when the system is already up then ntp doesn't complain anymore about the missing user.
Thanks Jason
dCore user

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: ntp user missing
« Reply #10 on: February 27, 2019, 08:45:02 AM »
Ok, I think I know why.  I will aim to fix it today.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: ntp user missing
« Reply #11 on: February 28, 2019, 01:59:18 PM »
With changes to the ntp startup script it should now work when loaded during boot.


Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: ntp user missing
« Reply #12 on: February 28, 2019, 02:35:03 PM »
Hi
It works now.
But why it was not working before?
Thank you
dCore user

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: ntp user missing
« Reply #13 on: February 28, 2019, 03:50:12 PM »
Busybox adduser must be used in startup scripts for them to work when SCEs are loaded during boot.