Time sync problem


I checked there is no ntpd such thing in the rc.conf, even I set both items true via service menu, and there is no ‘local’ file such thing, so I edit the rc.conf, but I have a hard time to save changes, it keep saying file read only, use “!” to override but that didn’t work, I am getting mad with vi, any better editor out of the box ? I couldn’t install any app via app cafe this is another problem I post.


sudo /etc/rc.conf then you can edit it. You can’t use ! to override if you are a regular user only root or su or sudo can edit config files.


I’m trying this, but “su” doesn’t seem to work on my system (I just posted a thread on this), and when I sudo I get “command not found.” I seem to have problems with being root or administrator, like I set things up wrong.


I think you may have found your problem. In FreeBSD you have to install sudo. On TrueOS it comes installed by default, and the first user you created when you first installed TrueOS always has sudo rights. And if you su then it just asks you for the root password you created also when you first installed TrueOS. After that when you make a new account there is a check mark that says “can administrate system” that will give that user sudo rights. If you are missing su, and sudo you might have bigger problems than incorrect time.


Sudo does work, at least sometimes. But su never does. I always get back “sorry” when I use su. I didn’t do anything fancy when I set up my account. I just supplied my name and a password. Last night I tried to set up another account, checking the “su” privileges box, but I must have done that wrong as it is not listed at boot up.

  1. sudo -i
  2. passwd root
  3. su


Thanks bsdtester, that gets me to be root, as evidenced by the # instead of the %. However, when I then try to run /etc/rc.conf or /etc/rc.conf.local, I get “unknown login.” I am using su before these commands). If I run them without su, I get “permission denied.”


sudo vim /etc/rc.conf
enter your password,
then edit and save with :w + Enter.


  • su -
  • enter root password
  • vim /etc/rc.conf
  • :w + Enter

You can try replacing :w with :w! to force rewrite, but it shouldn’t be necessary and, potentially, dangerous.

replace vim with your fav editor.


Thanks vit, I am getting somewhere but still not there. I had to install vim, and can get now get to it in a terminal, But I’m confused what to do next. I copied the above file re: setting the time, and pasted it into vim, and attempted to edit it, but didn’t get anywhere. (can’t change the no’s to yes.) Maybe I just need to learn how to use vim first? I exited without saving, so hopefully no damage done.


It won’t hurt, as vi/vim are usual “goto” editors you can find on almost any unix system, but not needed for your case. Anyway :slight_smile:

  • sudo vim /etc/rc.conf
  • enter your password
  • i to enter inset mode
  • use arrow keys to navigate to where you want to type
  • ntpd_enable="YES"
  • press Esc button
  • :w
  • :q

Or you can use ee

  • sudo ee /etc/rc.conf
  • … (when you’re done typing)
  • Esc -> leave editor -> save changes


Can he use the Lumina Text Editor?


or ee?, which is installed by default


Lumina Text Editor isn’t installed by default?.. vi should be installed by default. I don’t know if vim is though.


Well, I’ve been trying various suggestions. Did some research on editing conf files, finally realized what I was doing wrong in my typing (wasn’t paying attention to the cursor). I finally decided to use ee for editing. I could not figure out how to bring up the ntpd file, so I copied and pasted it from thr example provided by bsdtester. Saved and exited. Restarted, but time problem remains. I temporarily reset the time in SysAdmin by restarting ntpd. But I’ll have to keep doing it unless I figure our what’s stopping me from getting it going on boot.

What about this idea? Set my time zone to one that will give me the correct time, regardless of the problem? Like Ireland time? Somewhere 4 hours ahead. Probably won’t work, too easy (or weird).


If ntpd is running, it looks like this:

$ `which ps` ax -o command | grep ntpd | grep -v grep
/usr/local/sbin/ntpd -f /usr/local/etc/ntpd.conf -d -s
ntpd: ntp engine (ntpd)
ntpd: dns engine (ntpd)

What’s Your result?


Here’s what I get:

[root@trueos-3785] ~# which ps ax -o command | grep ntpd | grep -v grep
/usr/local/sbin/ntpd -f /usr/local/etc/ntpd.conf -d -s
ntpd: ntp engine (ntpd)
ntpd: dns engine (ntpd)

I should also tell you that my many attempts at gettting it to run have resulted in a boatload of statements at boot having to do with rc.conf.

If I were to reinstall, paying attention to how time is setup, could this problem be averted? Because I’m thinking of doing that, when the next version comes out. I won’t lose anything because I don’t have anything on this system, I’m just trying to learn how to use it.


Possibly, but you can’t be sure you won’t do same stuff you did before. Also, there could be a bug in the installer. Anyways, sounds like too much trouble for just having to adjust time/clock.

Is probably no needed, as the service is managed through openrc.

If it starts before network service(s) is up, it won’t sync I wonder. Maybe there is a bug in the service script.

# /usr/local/etc/init.d/openntpd
        need localmount
        provide ntpd

but what could I possibly know about it… hm…
What does it say in the /var/log/openntpd.log?

What does it show there? what time/timezone?
Maybe you can adjust the date/time/zone there?

BTW just for the sake of completeness, you can do:

sudo lumina-textedit /etc/rc.conf

to view/edit files. Could you maybe post the content of your rc.conf?


vit, when I do “sudo lumina textedit /etc/rc.conf,” I get the following:

sudo lumina-textedit /etc/rc.conf

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.

I have tried changing the time zone, it won’t change. Anyway, I should keep it to EDT and try to solve the problem for real. I can run a command and correct the time just for this session, but it won’t carry over to the next.


sudo env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY lumina-textedit /etc/rc.conf
or just
sudo DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY lumina-textedit /etc/rc.conf

I mean is your BIOS time in UTC or local? if local, what timezone?


Sorry, I meant to include that. My bios is set to Universal time. time zone is EDT.

I need to say that I have done a lot of tinkering (and I’m very new and don’t know bsd well at all). In services, I just noticed that rc is not enabled or running. Also, at startup, I get a bunch of messages that rc.conf could not be found. There will be a bunch of them, them more, and more and finally the system will boot. I think they may be from my many unsuccssful attempts to solve this problem. Many wrong terminal commands.

At this point, I think I have messed things up so bad that my clock just won’t work. I plan to reinstall when the next version is out, and leave things be until then. I noticed that in the manual, it advises you set choose Universal time if your bios is set to that, so that will be my tentative plan, unless I hear otherwise.

I can live with a clock that’s 4 hours fast for now, I have plenty of other ways to tell time. I was really trying to solve it more to learn about bsd than anything esle, but I think a reinstall is in order at this point. I’ll continue to use True until then, but I’m not going to worry about the time issue anymore.

Meanwhile, what happened top the OP?

Edit: I used to have this problem with linux as well. It was always a 4 hour difference then as well, so maybe this really has to do with the local/universal issue. I remember there was a fix for it, but lately my linux systems havevn’t had the problem. Mayube the devs will sort it all out by next release.