No reason not to do so, and it'll make log times easier to compare.
Edit /etc/ntp.conf; comment out all the lines starting "pool" or "server"; add "server [your-NTP-server] iburst".
Then restart ntpd; for me this is /etc/init.d/ntp restart, but with systemd it's probably changed.
Didn't find your answer? Ask the community — no account required.
A
A. Dumas
Ntp is only needed if you want a server, syncing is done via
formatting link
which shows that the config file is /etc/systemd/timesyncd.conf or a .network file (no idea where) or via dhcp. Not sure which takes precedence.
This
formatting link
only mentions the .conf file.
A
A. Dumas
See the server that is being used (was last used? will be next used?): "timedatectl timesync-status". See also "man timedatectl".
M
Martin Gregorie
Everything you need is in one of these:
man ntpd man 5 ntp.conf
The first two deal with setting up ntpd. I install ntpd on my Linux systems as a matter of course with the instance on my house server set as the default time reference for the others, but my other hosts also reference other time servers as well so there is no single point of failure.
Or you can use ntpdate:
man 8 ntpdate
It is usually executed once at boot time but you could also run it every few hours or days by a cron job. However, but its manpage says it "has known bugs and deficiencies and nobody has volunteered to fix them in a long time. The good news is the functionality originally intended for this program is available in the ntpd and sntp programs",
So look at the sntp manpage as well.
Martin | martin at
Gregorie | gregorie dot org
A
A. Dumas
This is unusable information. Raspbian doesn't use ntp/ntpd since Debian switched to systemd, it's not even installed. Details here, for instance:
formatting link
It should work out of the box: if the local dhcp server provides (an) ntp server address(es), timesyncd will use it. Check which servers are used via "timedatectl show-timesync --all"
M
Martin Gregorie
Err, no.
ntpd is included in Buster, but not as a separate package: according to "apt search ntpd" its part of collectd-core/stable 5.8.1-1.3 armhf The associated packages ntp-doc and ntpdate are also part of Buster.
You're right that it wasn't part of wheezy, jessie or stretch but the Buster insitu upgrade installed it when I did that the other week. It was trivia to customise ntpd on my RPi by copying ntp.conf from this laptop to my RPi.
ntpd currently up and running, though the setup is a bit Mickey Mouse since systemctl doesn't know it exists. It is apparently controlled via the old System V init script because that has been installed as /etc/ init.d/ntp - since its starting up automatically at boot time and running quietly in the background I've not yet made the time to find out anything more about the mechanism that's launching it.
Martin | martin at
Gregorie | gregorie dot org
A
A. Dumas
Your upgrade was weird before, too. A fresh install of Raspbian Buster
*does not* have ntp(d). It is in the repo, obviously.
H
Helmut Harnisch
Am 28.07.2019 um 00:29 schrieb Fokke Nauta:
what gives
sudo pdbedit -L -v pi
M
mark lewis
Re: Re: Can't access share with username & password By: Fokke Nauta to Martin Gregorie on Wed Jul 31 2019 11:45:46
you have to install ntp/ntpd first...
)\/(ark
F
Fokke Nauta
There is no such file.
F
Fokke Nauta
There is no page about ntpd
There is no page about ntp.conf in section 5
F
Fokke Nauta
Didn't work for me.
T
The Natural Philosopher
here we go again.
Why not read all the OTHER posts that told you how to install ntp?
He hasn't even installed it yet
Of what good are dead warriors? ? Warriors are those who desire battle
more than peace. Those who seek battle despite peace. Those who thump
their spears on the ground and talk of honor. Those who leap high the
battle dance and dream of glory ? The good of dead warriors, Mother, is
that they are dead.
Sheri S Tepper: The Awakeners.
T
The Natural Philosopher
In the faint and vanishing possibility that ypu actually genuinely want to learn
formatting link
No Apple devices were knowingly used in the preparation of this post.
T
The Natural Philosopher
man timesyncd
No Apple devices were knowingly used in the preparation of this post.
T
The Natural Philosopher
$ systemctl status systemd-timesyncd.service ? systemd-timesyncd.service - Network Time Synchronization Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled) Drop-In: /lib/systemd/system/systemd-timesyncd.service.d ??disable-with-time-daemon.conf Active: active (running) since Wed 2019-07-24 05:38:11 BST; 1 weeks
0 days ago Docs: man:systemd-timesyncd.service(8) Main PID: 208 (systemd-timesyn) Status: "Synchronized to time server 193.150.34.2:123 (0.debian.pool.ntp.org)." CGroup: /system.slice/systemd-timesyncd.service ??208 /lib/systemd/systemd-timesyncd
Jul 24 05:17:10 MiPiFi systemd[1]: Starting Network Time Synchronization... Jul 24 05:17:11 MiPiFi systemd-timesyncd[208]: System clock time unset or jumped backwards, restoring from recorded timestamp: Wed 2019-07-24
05:38: Jul 24 05:38:11 MiPiFi systemd[1]: Started Network Time Synchronization. Jul 24 08:55:59 MiPiFi systemd-timesyncd[208]: Synchronized to time server 193.150.34.2:123 (0.debian.pool.ntp.org). Warning: systemd-timesyncd.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Ideas are more powerful than guns. We would not let our enemies have
guns, why should we let them have ideas?
Josef Stalin
F
Fokke Nauta
sudo adduser fokke twice entered UNIX password
sudo grep fokke /etc/passwd
fokke:x:1001:1001:,,,:/home/fokke:/bin/bash sudo smbpasswd -a fokke
sudo smbpasswd -a fokke twice entered smb password
sudo pdbedit -L -v fokke
resulted in: Unix username: fokke NT username: Account Flags: [U ] User SID: S-1-5-21-3147481771-2983603259-3968742567-1001 Primary Group SID: S-1-5-21-3147481771-2983603259-3968742567-513 Full Name: Home Directory: \\raspberrypi\fokke HomeDir Drive: Logon Script: Profile Path: \\raspberrypi\fokke\profile Domain: RASPBERRYPI Account desc: Workstations: Munged dial: Logon time: 0 Logoff time: never Kickoff time: never Password last set: wo, 31 jul 2019 11:54:20 CEST Password can change: wo, 31 jul 2019 11:54:20 CEST Password must change: never Last bad password : 0 Bad password count : 0 Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
sudo mkdir /home/fokke
answer: mkdir: kan map ?/home/fokke? niet aanmaken: Bestand bestaat al (can't create map as it already exists)
sudo chown fokke:fokke /home/fokke
ls -la /home
totaal 16 drwxr-xr-x 4 root root 4096 jul 31 11:50 . drwxr-xr-x 21 root root 4096 mei 19 14:37 .. drwxr-xr-x 2 fokke fokke 4096 jul 31 11:50 fokke drwxrwxrwx 20 pi pi 4096 jul 24 14:09 pi
[C:\Program Files\JPSoft\TCCLE14x64]net view \\raspberrypi System error 53 has occurred.
The network path was not found.
[C:\Program Files\JPSoft\TCCLE14x64]net use s: \\raspberrypi\pishare /user:fokke /persistent:no The password or user name is invalid for \\raspberrypi\pishare.
Enter the password for 'fokke' to connect to 'raspberrypi': System error 1326 has occurred.
The user name or password is incorrect.
[C:\Program Files\JPSoft\TCCLE14x64]net use s: \\raspberrypi\pishare /user:pi persistent:no System error 1326 has occurred.
The user name or password is incorrect.
Many thanks for your extensive help. Tried it all but it won't work :-(
Fokke
F
Fokke Nauta
pi@raspberrypi:~ $ sudo pdbedit -L -v pi
Unix username: pi NT username: Account Flags: [U ] User SID: S-1-5-21-3147481771-2983603259-3968742567-1000 Primary Group SID: S-1-5-21-3147481771-2983603259-3968742567-513 Full Name: Home Directory: \\raspberrypi\pi HomeDir Drive: Logon Script: Profile Path: \\raspberrypi\pi\profile Domain: RASPBERRYPI Account desc: Workstations: Munged dial: Logon time: 0 Logoff time: never Kickoff time: never Password last set: do, 18 jul 2019 15:33:48 CEST Password can change: do, 18 jul 2019 15:33:48 CEST Password must change: never Last bad password : 0 Bad password count : 0 Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
pi@raspberrypi:~ $ sudo pdbedit -L -v fokke
Unix username: fokke NT username: Account Flags: [U ] User SID: S-1-5-21-3147481771-2983603259-3968742567-1001 Primary Group SID: S-1-5-21-3147481771-2983603259-3968742567-513 Full Name: Home Directory: \\raspberrypi\fokke HomeDir Drive: Logon Script: Profile Path: \\raspberrypi\fokke\profile Domain: RASPBERRYPI Account desc: Workstations: Munged dial: Logon time: 0 Logoff time: never Kickoff time: never Password last set: wo, 31 jul 2019 11:54:20 CEST Password can change: wo, 31 jul 2019 11:54:20 CEST Password must change: never Last bad password : 0 Bad password count : 0 Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
A
Andy Burns
Presume that 'ping raspberrypi' works from the Win10 PC?