[Solved]Porteus Kiosk NTP settings
Please describe in detail what has been changed and hopefully other kiosk user will be able to help.
Porteus team wont resolve bugs posted in this category as we support only modifications made by the kiosk wizard.
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
[Solved]Porteus Kiosk NTP settings
Post#1 by rh102801 » 31 Mar 2014, 19:20
We are planning to use it as a time keeper for users to clock in a and out and want to make sure the time on the system is synched to our time server.
Thanks
rh102801
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Porteus Kiosk NTP settings
Post#2 by rh102801 » 05 May 2014, 15:20
"http://www.filewatcher.com/m/ntp-4.2.6p ... 144-0.html" which displays several links to download a porteus/x86_64/modules/network/ntp-4.2.6p3-x86_64-1.XZM
I am not sure yet but I believe that might be an XZM for the desktop version. Is it possible to copy that XZM and package it with the ISO to make it part of the Kiosk version and be able to sync all my kiosks to an internal NTP server? Would this be considered a security issue to allow NTP on such system?
Thanks
rh102801
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Porteus Kiosk NTP settings
Post#3 by fanthom » 05 May 2014, 18:44
you have to customize kiosk ISO as described in the Kiosk FAQ. you can use our desktop edition to convert ntp txz package from slackware-14.1 (kiosk 3.0 is based on it) to xzm module.
then you have to follow this doc:
http://docs.slackware.com/howtos:network_services:ntp
and start ntp service through /etc/rc.d/rc.local.
good luck!
btw: on the new kiosk website (hoping to have it ready within 2 weeks) i'm going to offer a 'customized kiosk builds' service where i'll be doing such customizations myself for previously negotiated price.
if you are interested and dont want to wait - please send me an email on fanthom@porteus.org
fanthom
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Porteus Kiosk NTP settings
Post#4 by rh102801 » 08 May 2014, 17:30
One question I have about the XZM file is...Does it matter what name I give it? for instance if I called it 009-ntp.xzm would that be ok? Also would I place this file under the porteus/base along with the other xzm files or would I place it under the modules directory?
Thanks again
rh102801
-
- Contributor
- Posts: 686
- Joined: 26 Jun 2013, 14:03
- Distribution: x64 Openbox
- Location: Russia is causing the immense damage to humanity
- Contact:
Re: Porteus Kiosk NTP settings
Post#5 by tome » 08 May 2014, 19:34
Yes and no - don't use " " space characters and xzm modules are activated in alphabetical order. In your case 009-ntp.xzm should be OK.Does it matter what name I give it?
It matters little or does't matter, use base because I don't know if Kiosk supports modules directory.porteus/base or modules directory
tome
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Porteus Kiosk NTP settings
Post#6 by rh102801 » 09 May 2014, 15:31
root@porteus:/# chmod +x /etc/rc.d/rc.ntpd
root@porteus:/# /etc/rc.d/rc.ntpd start
Starting NTP daemon: /usr/sbin/ntpd -g/usr/sbin/ntpd: line 1: syntax error: unexpected word (expecting ")")
Any pointers would be greatly appreciated.
Thanks
rh102801
- freestyler
- Contributor
- Posts: 384
- Joined: 17 Oct 2013, 14:21
- Distribution: Porteus XFCE
Re: Porteus Kiosk NTP settings
Post#7 by freestyler » 09 May 2014, 15:43
instead of:
Code: Select all
-g/usr/sbin/ntpd
Code: Select all
-g /usr/sbin/ntpd
freestyler
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Porteus Kiosk NTP settings
Post#8 by rh102801 » 09 May 2014, 18:29
#!/bin/sh
# Start/stop/restart ntpd.
# Start ntpd:
ntpd_start() {
CMDLINE="/usr/sbin/ntpd -g"
echo -n "Starting NTP daemon: $CMDLINE"
$CMDLINE -p /var/run/ntpd.pid
echo
}
# Stop ntpd:
ntpd_stop() {
echo -n "Stopping NTP daemon..."
if [ -r /var/run/ntpd.pid ]; then
kill -HUP $(cat /var/run/ntpd.pid)
rm -f /var/run/ntpd.pid
else
killall -HUP -q ntpd
fi
echo
}
# Restart ntpd:
ntpd_restart() {
ntpd_stop
sleep 1
ntpd_start
}
# Check if ntpd is running
ntpd_status() {
if [ -e /var/run/ntpd.pid ]; then
echo "ntpd is running."
else
echo "ntpd is stopped."
exit 1
fi
}
case "$1" in
'start')
ntpd_start
;;
'stop')
ntpd_stop
;;
'restart')
ntpd_restart
;;
'status')
ntpd_status
;;
*)
echo "usage $0 start|stop|restart|status"
esac
rh102801
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Porteus Kiosk NTP settings
Post#9 by rh102801 » 12 May 2014, 15:01
http://pkgs.org/slackware-14.1/slackwar ... 4.txz.html
I used the txz2xzm tool from the desktop edition and recreatedthe iso. Installed and when I try to start the Daemon this time I get a different problem:
root@porteus:/# chmod +x /etc/rc.d/rc.ntpd
root@porteus:/# /etc/rc.d/rc.ntpd start
Starting NTP daemon: /usr/sbin/ntpd -g/usr/sbin/ntpd: error while loading shared libraries: libcap.so.2: cannot open shared object file: No such file or directory
Can anyone recommend another site to download from?
Thanks
rh102801
- freestyler
- Contributor
- Posts: 384
- Joined: 17 Oct 2013, 14:21
- Distribution: Porteus XFCE
Re: Porteus Kiosk NTP settings
Post#10 by freestyler » 12 May 2014, 15:19
freestyler
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Porteus Kiosk NTP settings
Post#11 by rh102801 » 14 May 2014, 15:08
After some searching I came up with this http://www.ducea.com/2006/09/11/error-s ... _socktype/ which basically says I had to modify the /etc/services and include a line for ntp as follow:
ntp 123/tcp
ntp 123/udp
Well when I looked under /etc I could not locate that file so I created one and placed in Rootcopy. Now when I test I get the following:
root@porteus:~# ntpdate pool.ntp.org
14 May 06:56:11 ntpdate[2033]: sendto(bindcat.fhsu.edu): Operation not permitted
14 May 06:56:12 ntpdate[2033]: sendto(jikan.ae7.st): Operation not permitted
14 May 06:56:12 ntpdate[2033]: sendto(clock.trit.net): Operation not permitted
14 May 06:56:12 ntpdate[2033]: sendto(173.44.32.10): Operation not permitted
14 May 06:56:13 ntpdate[2033]: sendto(bindcat.fhsu.edu): Operation not permitted
14 May 06:56:14 ntpdate[2033]: sendto(jikan.ae7.st): Operation not permitted
14 May 06:56:14 ntpdate[2033]: sendto(clock.trit.net): Operation not permitted
14 May 06:56:14 ntpdate[2033]: sendto(173.44.32.10): Operation not permitted
14 May 06:56:15 ntpdate[2033]: sendto(bindcat.fhsu.edu): Operation not permitted
14 May 06:56:16 ntpdate[2033]: sendto(jikan.ae7.st): Operation not permitted
14 May 06:56:16 ntpdate[2033]: sendto(clock.trit.net): Operation not permitted
14 May 06:56:16 ntpdate[2033]: sendto(173.44.32.10): Operation not permitted
14 May 06:56:17 ntpdate[2033]: sendto(bindcat.fhsu.edu): Operation not permitted
14 May 06:56:18 ntpdate[2033]: sendto(jikan.ae7.st): Operation not permitted
14 May 06:56:18 ntpdate[2033]: sendto(clock.trit.net): Operation not permitted
14 May 06:56:18 ntpdate[2033]: sendto(173.44.32.10): Operation not permitted
14 May 06:56:20 ntpdate[2033]: no server suitable for synchronization found
I am able to start the Daemon but it never connects to my ntp server:
root@porteus:~# tail /var/log/ntp.log
root@porteus:~# chmod +x /etc/rc.d/rc.ntpd
root@porteus:~# /etc/rc.d/rc.ntpd start
Starting NTP daemon: /usr/sbin/ntpd -g
root@porteus:~# ntpq -p
ntpq: write to localhost failed: Operation not permitted
Does anyone have any ideas as to what else I might be missing? I have the feeling that I am getting very close to completing this but need that last push to get me thru the finish line.
Thanks
rh102801
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Porteus Kiosk NTP settings
Post#12 by rh102801 » 14 May 2014, 15:15
I will try that and report back.
Thanks
rh102801
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: Porteus Kiosk NTP settings
Post#13 by rh102801 » 15 May 2014, 18:29
root@porteus:~# ntpdate myntpserver.com
15 May 13:06:56 ntpdate[2065]: step time server 172.X.X.X offset 14426.737712 sec
root@porteus:~# /etc/rc.d/rc.ntpd start
Starting NTP daemon: /usr/sbin/ntpd -g
root@porteus:~# ntpq -p
localhost: timed out, nothing received
***Request timed out
Would my assumption be correct?
This is what I added to the firewall file (rootcopy/etc/rc.d/rc.FireWall)
iptables -A OUTPUT -p udp --dport 123 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p udp --dport 123 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
I can of figured that if the kiosk is the one initiating the connection this would suffice. Is that not the case? any other suggestions?
Also, I am curious about the following:
When I restart the kiosk, I have to manually do the ntpdate command and then start the service (I guess I could start the service without this step 1st), my question is how could I automate the starting of the service? the idea is that id a kiosk loses power and reboots, that when the system comes up, it will automatically update its time if necessary from the ntp server, however if I have to manually start the daemon for this to happen, it kind of defeats the purpose.
Feel free to make any comments, provide ideas or critique what I have done so far, I am sure there is a better way of doing all this but being a Linux noob I am surprised I made it this far to be honest.
Thanks
rh102801
-
- Black ninja
- Posts: 51
- Joined: 21 Mar 2014, 14:02
- Distribution: porteus 3.7 kiosk
- Location: Chattanooga
Re: [Solved]Porteus Kiosk NTP settings
Post#14 by rh102801 » 30 May 2014, 19:41
He did excellent work and pointed out what he had to change so it helped me understand what I was doing wrong or missing. I highly recommend the custom ISO service. The kiosk is getting better and better and I am very pleased with the functionality and how secure it is.
Thanks for all your hard work

rh102801
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: [Solved]Porteus Kiosk NTP settings
Post#15 by fanthom » 31 May 2014, 09:03
for the record - the main issue was that localhost interface did not exist in kiosk that's why there was:
Code: Select all
root@porteus:~# ntpq -p
localhost: timed out, nothing received
***Request timed out
took me a while to figure this out

fanthom