PDA

Bekijk de volledige versie : Cannot change smb.conf



Bohlendach
31-07-2010, 09:56
I have a RT-N16 with 1.9.2.7-rtn-r1884.

I use the Samba integrated in the firmware.

I want to change the smb.conf to:


encrypt passwords = yes

I use vi for editing and save it by typing :wq

and then I do:


echo "/etc/smb.conf" >> /usr/local/.files && flashfs save && flashfs commit && flashfs enable

But after a reboot it says


encrypt passwords = no

shantanugoel
31-07-2010, 23:48
I think that is because the smb.conf file is auto-generated by the firmware on every boot up. (I came across this when I was trying to solve a configuration issue in fstab and saw the relevant code in services.c I think)

Bohlendach
01-08-2010, 08:38
I think that is because the smb.conf file is auto-generated by the firmware on every boot up.

So what is the best solution to this?

Should I simply disable the integrated samba and


ipkg install samba2

or should I just add


/usr/sbin/smbd -D
/usr/sbin/nmbd -D

to the post-mount script or make a script containing


/usr/sbin/smbd -D
/usr/sbin/nmbd -D

and put it in /opt/etc/init.d?

or shouldn't smbd and nmbd run as deamons?

And then edit the smb.conf!?!

wpte
01-08-2010, 19:52
I think that is because the smb.conf file is auto-generated by the firmware on every boot up. (I came across this when I was trying to solve a configuration issue in fstab and saw the relevant code in services.c I think)

yes they are auto-generated

if you have a wengi like setup you could use this how-to:
http://wl500g.info/showpost.php?p=60934&postcount=5

Bohlendach
01-08-2010, 21:21
if you have a wengi like setup you could use this how-to:
http://wl500g.info/showpost.php?p=60934&postcount=5

I finally decided to install samba2, because manually starting


/usr/sbin/smbd -D
/usr/sbin/nmbd -D

did not work well

pedrinho
26-08-2010, 21:40
hi,
with the wengi installation may u use the internal samba, disable it at
the web-if and make a SxxSamba at init.d with the start strings,
the smb.conf file location can be defined there too



#!/bin/sh
/usr/sbin/smbd -D -l /opt/var/log/smbd.log -s /opt/etc/samba/smb.conf
/usr/sbin/nmbd -D -n asus -o -l /tmp -s /opt/etc/samba/smb.conf


works also to start ftp



#!/bin/sh
/usr/sbin/vsftpd /opt/etc/vsftpd.conf


ps.
search tips how to define the .conf file location for samba/ftp with xinetd
(without the files are expected at /etc)

Bohlendach
14-09-2010, 23:25
Thanks a lot






/usr/sbin/nmbd -D -n asus -o -l /tmp -s /opt/etc/samba/smb.conf



What does the -o option?