Community discussions

MikroTik App
 
ITnerd
just joined
Topic Author
Posts: 9
Joined: Fri Sep 22, 2017 1:07 am

Changes to NTP in RouterOS 7

Fri Mar 17, 2023 8:39 pm

I have been using a script to configure the NTP client in my Groove routers. Under 6.48.6, this worked fine:

/system clock set time-zone-name=America/MyCity
/system ntp client set primary-ntp 10.200.7.34
/system ntp client set enabled=yes

I upgraded RouterOS to 7.8 and the middle line no longer works ie. the previous command for setting the primary ntp server fails.

Did something change with the syntax? I've been through the documentation and there are some scripting examples for RouterOS 6.x but none for 7 that I could see.

Thanks in advance for any info.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11452
Joined: Thu Mar 03, 2016 10:23 pm

Re: Changes to NTP in RouterOS 7

Fri Mar 17, 2023 8:56 pm

Yes, NTP setup changed. It's pretty easy to find out the new syntax if you try it manually.

/system/clock/set time-zone-name=America/MyCity time-zone-autodetect=no
/system/ntp/client/set servers=10.200.7.34  enabled=yes

There's only one property (servers), but takes a coma-separated list of servers (can be more than two in total).
 
ITnerd
just joined
Topic Author
Posts: 9
Joined: Fri Sep 22, 2017 1:07 am

Re: Changes to NTP in RouterOS 7

Wed Mar 22, 2023 9:40 pm

Thank you for that - NTP works fine now.

On a related note:

After upgrading from 6.48.6 to 7.8, the admin account that I created using a configuration script no longer works properly.

I've been using the same config script for hundreds of 6.48.6 devices and never had a problem. I changed the syntax for the NTP setup as per your info, but didn't change anything else. The script completes successfully, but the admin account doesn't work afterwards, effectively locking me out of the device.

Did something change in 7.x in relation to creating/managing user accounts? These are the commands we use in the script. The admin account works fine, but I can't login with the sysop account. The admin account is read-only so I can't use it to reset the password on the sysop account.

/user add group=full name=sysop
/user set sysop password=”xxx@jkde123”
/user set admin password=”xx@@V#xxx#275”
/user set admin group=read

Thank you
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11452
Joined: Thu Mar 03, 2016 10:23 pm

Re: Changes to NTP in RouterOS 7

Wed Mar 22, 2023 10:46 pm

I never set up users using a script, so I can't help you with that ....

Who is online

Users browsing this forum: Bing [Bot], tiklavirus and 29 guests