Results 1 to 7 of 7

Thread: Cannot change smb.conf

  1. #1
    Join Date
    Feb 2008
    Location
    Copenhagen, Denmark
    Posts
    41

    Cannot edit smb.conf

    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:

    Code:
    encrypt passwords = yes
    I use vi for editing and save it by typing :wq

    and then I do:

    Code:
    echo "/etc/smb.conf" >> /usr/local/.files && flashfs save && flashfs commit && flashfs enable
    But after a reboot it says

    Code:
    encrypt passwords = no
    Last edited by Bohlendach; 31-07-2010 at 11:44.

  2. 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)

  3. #3
    Join Date
    Feb 2008
    Location
    Copenhagen, Denmark
    Posts
    41
    Quote Originally Posted by shantanugoel View Post
    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

    Code:
    ipkg install samba2
    or should I just add

    Code:
    /usr/sbin/smbd -D
    /usr/sbin/nmbd -D
    to the post-mount script or make a script containing

    Code:
    /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!?!
    Last edited by Bohlendach; 01-08-2010 at 14:36.

  4. #4
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by shantanugoel View Post
    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

  5. #5
    Join Date
    Feb 2008
    Location
    Copenhagen, Denmark
    Posts
    41
    Quote Originally Posted by wpte View Post
    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

    Code:
    /usr/sbin/smbd -D
    /usr/sbin/nmbd -D
    did not work well

  6. #6
    Join Date
    Aug 2010
    Location
    brasil
    Posts
    3
    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

    Code:
    #!/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

    Code:
    #!/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)

  7. #7
    Join Date
    Feb 2008
    Location
    Copenhagen, Denmark
    Posts
    41
    Thanks a lot

    Quote Originally Posted by pedrinho View Post

    Code:
    /usr/sbin/nmbd -D -n asus -o -l /tmp -s /opt/etc/samba/smb.conf
    What does the -o option?

Similar Threads

  1. Подключаем USB HDD к роутеру
    By Hornet in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 3172
    Last Post: 31-08-2011, 13:03
  2. Firmware v1.9.2.7 CR1 [Oleg]
    By Oleg in forum WL-500g Firmware Releases
    Replies: 53
    Last Post: 14-04-2005, 00:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •