After a reboot, the changes of configs are disappear.

s1000

Cadet
Joined
Jul 9, 2020
Messages
8
I tried to change the parameters via visudo.
After a reboot, the changes of configs are disappear.
How to make configuration changes are not lost?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
This behavior is by design. FreeNAS changes should only be performed via the GUI. The middleware uses the GUI to write changes to the FreeNAS database, and to translate database changes into dynamic run-time changes to config files.
 

s1000

Cadet
Joined
Jul 9, 2020
Messages
8
>> The middleware uses the GUI to write changes to the FreeNAS database
Ok.
Is there a way to change the contents of a /usr/local/etc/sudoers file or something else in the FreeNAS database?
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
Via the GUI: Accounts->Users->Edit and than select the [ ] permit sudo checkbox.
 

s1000

Cadet
Joined
Jul 9, 2020
Messages
8
Via the GUI: Accounts->Users->Edit and than select the [ ] permit sudo checkbox.
For example I need have in the /usr/local/etc/sudoers
nagios ALL=NOPASSWD:/usr/local/libexec/nagios/
It's imposible via the GUI
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
It's imposible via the GUI
It's not. Works exactly like I described it. (FreeNAS 11.3u4.1)

Code:
root@nas:~ # su nag_clt
$ sudo grep nag_clt /usr/local/etc/sudoers
Password:
nag_clt ALL=(ALL) ALL
 
Last edited:

s1000

Cadet
Joined
Jul 9, 2020
Messages
8
It's not. Works exactly like I described it. (FreeNAS 11.3u4.1)

Have you tried rebooting the system or changing any user parameters through the GUI
In both cases, I lose all changes in the sudoers file
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
On my testserver the sudo permission is still there after the reboot.
 

s1000

Cadet
Joined
Jul 9, 2020
Messages
8
On my testserver the sudo permission is still there after the reboot.
I'm testing the FreeNAS on the pair physical servers and one virtual one. On all servers, the files are reduced to their initial form.
Version: FreeNAS-11.3-U4.1
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
You need to select the "Permit sudo" checkbox, and also click the "Save" button when editing your nagios account.
 
Top