Hi,
I am trying to add a line into smb.conf however whenever i restart samba services the smb.conf file appears to revert itself.
Is there any way to disable this behaviour?
smb.conf resetting after services restart?
Re: smb.conf resetting after services restart?
smb.conf is created on service start as you've found. It does include at the top another file which I believe remains static
Try adding your line to this file and see if that works. The only danger is that the rest of the smb.conf file could override your setting, or future updates will likely overwrite smb-extend.conf
Code: Select all
/etc/samba/smb-extend.conf
F5-221 TOS 4.2.09 4x4TB Seagate Ironwolf, 1x240GB Ironwolf SSD (Cache)
Re: smb.conf resetting after services restart?
Sadly it looks like that file is rewritted too
I added 2 coment lines in to test:
I added 2 coment lines in to test:
Code: Select all
[root@TNAS-7702 samba]# tail smb-extend.conf
full_audit:syslog = true
full_audit:prefix = %u|%I
full_audit:success = connect mkdir rmdir pread_send pread_recv create_file read pread write pwrite sendfile rename unlink symlink link
full_audit:failure = connect
security = user
include = /etc/samba/smb-null.conf
#
#
[root@TNAS-7702 samba]# /etc/init.d/samba restart
Reloading smb.conf file: 0
0
[root@TNAS-7702 samba]# tail smb-extend.conf
veto files = /.AppleDB/.AppleDouble/.AppleDesktop/Network Trash Folder/Temporary Items/
hide files = /~$*.doc?/~$*.xls?/~$*.ppt?
vfs objects = full_audit catia fruit streams_xattr
fruit:aapl = yes
full_audit:syslog = true
full_audit:prefix = %u|%I
full_audit:success = connect mkdir rmdir pread_send pread_recv create_file read pread write pwrite sendfile rename unlink symlink link
full_audit:failure = connect
security = user
include = /etc/samba/smb-null.conf
[root@TNAS-7702 samba]#
Re: smb.conf resetting after services restart?
Hi,
I'm not sure what the consequences will be if you modify the configuration file.
If you want to try to add content, maybe you can try to use "chattr -i /path" to restore the file to read-write, and then use "chattr +i /path" to lock the file as read-only after the change.
I'm not sure what the consequences will be if you modify the configuration file.
If you want to try to add content, maybe you can try to use "chattr -i /path" to restore the file to read-write, and then use "chattr +i /path" to lock the file as read-only after the change.
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement)
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement)