Small embedded system, need working ntpd... - Embedded
This is a discussion on Small embedded system, need working ntpd... - Embedded ; I have a small embedded system (pc/104 board, CF-boot, read-only root file system, etc). I am trying to get a ntp daemon to work to keep the time accurate. I downloaded and compiled (on the same hardware but booting off ...
| | LinkBack | Tools |
|
#1
| |||
| |||
| file system, etc). I am trying to get a ntp daemon to work to keep the time accurate. I downloaded and compiled (on the same hardware but booting off a HD, which has more space, and is a 'normal' gentoo system) openntpd (www.openntpd.org), however I am having trouble getting it to work. There seems to be almost no documentation with it, nothing that really explains how to get it to work. I ran the file (./ntpd) and it said it couldn't find a file, /etc/ntpd.conf, I then created that file, then ran it again, now it says "unknown user _ntp". I have a "_ntp" user and a "ntp" user (one of my linux gurus said it would not be _ntp, another said it would be _ntp, so I'm confused). In either case it doesn't work, gives me the "unknown user _ntp" and that's as far as I get. Anyone used this ntpd, and if not, anyone have another simple, small ntpd I could throw into this project. TIA, Mark Brodis |
|
#2
| |||
| |||
| On 2005-06-08, Mark > I have a small embedded system (pc/104 board, CF-boot, read-only root > file system, etc). I am trying to get a ntp daemon to work to keep the > time accurate. I downloaded and compiled (on the same hardware but > booting off a HD, which has more space, and is a 'normal' gentoo > system) openntpd (www.openntpd.org), however I am having trouble > getting it to work. > > There seems to be almost no documentation with it, nothing that really > explains how to get it to work. Someone else emailed me about that today, also for an embedded system. (The "make install" process normally takes care of most installation tasks on self-hosted systems). The doco has been updated in the latest snapshot with the details (see the INSTALL file): http://www.zip.com.au/~dtucker/openn...050626p.tar.gz > I ran the file (./ntpd) and it said it couldn't find a file, > /etc/ntpd.conf, I then created that file, then ran it again, now it > says "unknown user _ntp". I have a "_ntp" user and a "ntp" user (one of > my linux gurus said it would not be _ntp, another said it would be > _ntp, so I'm confused). It defaults to "_ntp" unless you overrode it at configure time with --with-privsep-user=foo. > In either case it doesn't work, gives me the > "unknown user _ntp" and that's as far as I get. It's possible that the problem isn't in ntpd itself, eg if your flash filesystem is missing some of the components required for the getpwnam() function to work (eg /etc/nsswitch.conf or the libnss*.so files if you're using glibc). Try the test program at the bottom of this post. If that doesn't work either then you need to take a closer look at your system. $ ./a.out _ntp home dir = /var/empty/ntpd $ ./a.out root home dir = /root > Anyone used this ntpd, and if not, anyone have another simple, small > ntpd I could throw into this project. Well, it works for me :-) I have used it on an embedded Linux firewall/ router (300MHz Geode, 64MB RAM, 2.4 kernel, uClibc, busybox plus assorted other stuff). [example program] #include #include #include int main(int argc, char **argv) { struct passwd *pw; if (argc != 2) { printf("usage: %s username\n", argv[0]); exit(0); } pw = getpwnam(argv[1]); if (pw == NULL) printf("getpwnam failed\n"); else printf("home dir = %s\n", pw->pw_dir); exit(0); } -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement. |
|
#3
| |||
| |||
| Thanks for your response! I had already figured out the majority of the problems, it was with some library conflicts....doh!! Once that was resolved, and I got some help from a brilliant embedded Linux guy, all fell into place... ![]() |
« Previous Thread
|
Next Thread »
| Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: Getting working SiRF Star II GPS +NTPD | unix | NTP | 1 | 02-06-2008 06:29 AM |
| Getting working SiRF Star II GPS +NTPD | unix | NTP | 0 | 02-04-2008 02:23 PM |
| ntpd just not working | unix | NTP | 14 | 10-10-2007 04:26 PM |
| My ntpd stopped working | unix | NTP | 34 | 10-02-2007 11:23 PM |
| ntpd for embedded system | unix | NTP | 3 | 10-02-2007 11:20 PM |
All times are GMT. The time now is 09:42 AM.

