Page 1 of 2 12 LastLast
Results 1 to 15 of 29

Thread: [HowTo] Install and Configure a WORKING Samba (Vista included)

  1. #1

    Lightbulb [HowTo] Install and Configure a WORKING Samba (Vista included)

    Disclaimer.
    Don't know if this guide works from head to tail.
    I've composed it from my remberings. But if you have a little knowledge about linux you should understand if there is anything missing or wrong.
    Please tell me, so I could update the how to.

    I assume you already installed the basics (steps from other tutorials).

    Let's get started...




    # Login to the web interface and disable the experimental Samba.

    # Uninstall any previous xinetd/samba2/samba3 you might have tried with no succes
    # Do not remove xinetd if you might need it !!!
    Code:
    ipkg remove xinetd
    ipkg remove samba2
    ipkg remove samba

    #I suggest you should go to /opt/etc/init.d and remove any SXXSamba file you might have there (XX is a number)




    # Get the better ipkg
    Code:
    wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ipkg-opt_0.99.163-9_mipsel.ipk 
    ipkg.sh install ipkg-opt_0.99.163-9_mipsel.ipk
    # Get the better uclibc
    Code:
    wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/uclibc-opt_0.9.28-12_mipsel.ipk
    ipkg.sh install uclibc-opt_0.9.28-12_mipsel.ipk
    # Update the list using the improved ipkg
    Code:
    ipkg update
    # Now upGRADE your system:
    Code:
    ipkg upgrade
    ipkg list_installed
    # Create a download folder for Samba, go there and download the latest version (in this case samba_3.0.26a-1_mipsel.ipk)
    Code:
    mkdir /opt/sambaNew
    cd /opt/sambaNew
    wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/samba_3.0.26a-1_mipsel.ipk
    # Install this version of Samba
    Code:
    ipkg install samba_3.0.26a-1_mipsel.ipk
    # This is my working smb.conf file located in /opt/etc/samba
    # edit it with your favorite editor, for example nano
    Code:
    nano /opt/etc/samba/smb.conf
    # Copy paste the green lines below in your smb.conf

    [global]
    workgroup = YOUR_WORKGROUP
    guest account = nobody
    security = share
    browseable = yes
    guest ok = yes
    guest only = no
    log level = 1
    max log size = 100
    encrypt passwords = yes
    dns proxy = no
    netbios name = Working_Samba
    server string = Router wl500gPremium working with Vista.

    [share1]
    path=/opt/share/samba1
    read only = no
    writeable = yes
    browseable = yes
    public = yes
    # Create the physical shared folder on your partition
    Code:
    mkdir /opt/share/samba1
    #In order to read/write to this folder you have to give rights permissions.
    Code:
    chmod 777 /opt/share/samba1
    # The final command...
    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    # Not sure if this is required, but in Windows Vista, you should run secpol.msc
    # then in the left tree select Local Policies > Security Options
    # then in the right open Network security: LAN Manager authentication level
    # and select Send LM & NTLM - use NTLMv2 security if negotiated instead of Send NTLMv2 response only.

    # Now you should have a working Samba share accesible even from Windows Vista.

    Cheers,
    Arise
    Last edited by Arise; 20-01-2008 at 13:25.

  2. #2
    I forgot something...

    # In the /opt/etc/init.d/S08samaba file you should make a little change.
    # So, in your favorite editor, do like:
    Code:
    nano /opt/etc/init.d/S08samaba
    # and change samba_active=0 to samba_active=1

  3. #3
    Join Date
    Feb 2005
    Location
    Germany - Frankfurt
    Posts
    1,548
    Thank you for the tut.
    Could you give us some facts on memory and cpu consumption of samba3?
    My personal opinion is that samba3 is a bit too much for that less ram (esp. for my WL-HDD).

    wengi
    Übersicht aller HowTos --- HowTo Overview (mostly german)
    WL-HDD mit diesem Setup. --- WL-HDD with this setup.
    Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread!
    Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein)

  4. #4
    Thanks for the tutorial,

    it's working fine on my wl500gP! I didn't change anything in my vista security policies...

  5. #5
    Join Date
    Jun 2007
    Location
    Netherlands
    Posts
    5

    Smile VISTA works with the samba version 2 !!

    I've been seeking on this forum.

    I'm running the default samba version 2
    The only thing I changed to get a VISTA client working is
    modify a policy.

    start | run | secpol.msc

    Go to Local Policies | Security Options and find Network Security: LAN Manager authentcation level

    Change settings from: SendNTLMv2 response only
    to: NTLMv2 session security if negotiated

  6. #6
    In some way I can't get to the secpol.msc.. maybe it has to do something with my dutch vista home premium?

    But I was wondering if I can make Samba 3 run as a xinetd service so that it only uses memory/cpu when I need it. Is this possible?

  7. #7
    Join Date
    Mar 2007
    Location
    Milano - Italy
    Posts
    164
    Same problem here, no way to find secpol.msc on my italian Vista OS.
    It seems secpol is available only on some high-level Vista version...
    but I've found this:

    If you're running a version of Vista that cannot use secpol.msc, you can edit the registry instead. Just change the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Lsa\LMCompatibilityLevel from a 3 to a 1.

    Actually my battery is very very low... I'll test it after a recharge...

    Max
    Last edited by QMax; 03-11-2007 at 18:33.

  8. #8
    Join Date
    Mar 2007
    Location
    Milano - Italy
    Posts
    164
    It doesn't work for me, I still continue having the error msg from Win that I've not the necessary rights to access that folder.

    EDIT: Can someone with a working Samba2/Vista environment, post me his smb.conf file please ?

    My suspect is that Vista use encrypted password, and in my smb.conf: encrypt passwords = no

    Thanks


    Max
    Last edited by QMax; 04-11-2007 at 09:11.

  9. #9

    Trouble starting smbd and nmbd

    Let me start this with "GREAT WORK" I have had some fun with this....

    Install of samba 3 went fine

    [admin@BestCat etc]$ wget http://ipkg.nslu2-linux.org/feeds/op...a-1_mipsel.ipk
    Connecting to ipkg.nslu2-linux.org[140.211.167.165]:80
    samba_3.0.26a-1_mips 100% |*****************************| 21324 KB 00:00 ETA
    [admin@BestCat etc]$
    [admin@BestCat etc]$ ipkg install samba_3.0.26a-1_mipsel.ipk
    Installing samba (3.0.26a-1) to /opt/...
    Configuring samba
    The original samba version 2 config (/etc/samba/smb.conf) is no longer
    working with this version of samba.
    Please create a new samba version 3 config (/opt/etc/samba/smb.conf).
    After verify your smb.conf file, modify and execute /opt/etc/init.d/S08samba
    to activate the samba version 3.
    Successfully terminated.


    Here is the current version of S08samba
    [admin@BestCat init.d]$ cat /opt/etc/init.d/S08samba
    #!/bin/sh

    # set samba_active=1 to activate samba
    samba_active=1

    [ 1 = $samba_active ] || exit 0

    if [ -n "`pidof smbd`" ] ; then
    echo "Stopping smbd:"
    killall smbd
    fi

    if [ -n "`pidof nmbd`" ] ; then
    echo "Stopping nmbd:"
    killall nmbd
    fi

    sleep 2
    /opt/sbin/smbd -D -l /opt/var/log/smbd.log -s /opt/etc/samba/smb.conf
    /opt/sbin/nmbd -D -n myasus -o -l /tmp -s /opt/etc/samba/smb.conf


    And smb.conf
    [admin@BestCat init.d]$ cat /opt/etc/samba/smb.conf
    [global]
    domain master = no
    local master = no
    preferred master = no
    hosts allow = 192.168.
    socket options = TCP_NODELAY IPTOS_LOWDELAY
    workgroup = Damnynke
    guest account = nobody
    security = share
    browseable = yes
    guest ok = yes
    guest only = no
    log level = 1
    max log size = 100
    encrypt passwords = yes
    dns proxy = no
    netbios name = Working_Samba
    server string = Router wl500gPremium

    [share1]
    path=/opt/share/samba1
    force user = admin
    writeable = yes
    browseable = yes
    public = yes

    [share2]
    path = /tmp/harddisk
    force user = admin
    writeable = yes
    browseable = yes
    public = yes

    However, I seem to be missing a specific version of libsasl2.so
    [admin@BestCat init.d]$ ./S08samba
    /opt/sbin/smbd: can't load library 'libsasl2.so.2'
    /opt/sbin/nmbd: can't load library 'libsasl2.so.2'

    Any clues where I can get the correct version?

    Any help would be greatly appreciated.
    Mark

  10. #10
    what version of samba and firmware are you using?
    i couldn't get mine to work. running kamikaze and samba 2.0.10-4 from x-wrt
    thanks.

    Quote Originally Posted by wknaap View Post
    I've been seeking on this forum.

    I'm running the default samba version 2
    The only thing I changed to get a VISTA client working is
    modify a policy.

    start | run | secpol.msc

    Go to Local Policies | Security Options and find Network Security: LAN Manager authentcation level

    Change settings from: SendNTLMv2 response only
    to: NTLMv2 session security if negotiated

  11. #11
    Join Date
    Mar 2007
    Location
    Milano - Italy
    Posts
    164
    No way for me to access to my USB connected to 500gP running original Samba from Oleg's firmware (Samba 2.0.10-security-rollup).
    I'll try installing Samba2...

    In the meantime I've found that my Vista Home Premium can't browse shared folders on a Win2000 SP4 machine... no problems browsing from XP....

    Any reports about how samba 3 works on small memory amount devices ?

    Max
    Last edited by QMax; 05-11-2007 at 20:52.

  12. #12

    Thumbs up

    Hello,

    this works fine for me with Olegs FW 1.9.2.7-8
    But with the FW 1.9.2.7-8 you must do the following steps:

    Install the better IPKG:
    Code:
    mkdir /opt/tmp
    mkdir /opt/tmp/ipkg
    ipkg.sh update
    ipkg.sh install ipkg-opt
    ipkg update
    ipkg upgrade
    Stop SAMBA2:
    Code:
    killall nmbd
    killall smbd
    Disable the SAMBA2 that comes with the FW:
    if you create a startup script for Samba:
    Code:
    chmod -x /opt/etc/init.d/S97Samba
    if not, be shure that SAMBA is disabled in the WEB-Interface!
    You can't uninstall it.. see:
    Code:
    ipkg list_installed
    Save the old SAMBA2 configuration if you create one:
    Code:
    mv /opt/etc/samba/smb.conf /opt/etc/samba/smb.conf.smb2
    Install SAMBA 3.0.26a-1:
    Code:
    ipkg install sama
    Configure your smb.conf.
    Thats my:
    Code:
    [global]
    workgroup = MATRIX
    guest account = nobody
    security = share
    browseable = yes
    guest ok = yes
    guest only = no
    log level = 0
    log file = /opt/logs/smbd.log
    max log size = 100
    encrypt passwords = yes
    dns proxy = no
    netbios name = WL500gP
    server string = ASUS WL500g Premium
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_SNDBUF=8192 
    
    [share$]
    path=/
    writeable = yes
    force user = root
    browseable = no
    
    [harddisk$]
    path=/tmp/harddisk
    writeable = yes
    force user = root
    browseable = no
    
    [flash$]
    path=/opt
    writeable = yes
    force user = root
    browseable = no
    
    [www]
    path=/tmp/harddisk/www
    writeable = yes
    force user = root
    browseable = yes
    
    [ftp_pvt]
    path=/tmp/harddisk/ftp_pvt
    writeable = yes
    force user = root
    browseable = yes
    
    [ftp_pub]
    path=/tmp/harddisk/ftp_pub
    writeable = yes
    force user = root
    browseable = yes
    
    [logs]
    path=/opt/logs
    writeable = yes
    force user = root
    browseable = yes
    /opt is a usb-flash-stick
    and /tmp/harddisk is a usb-hdd

    Don't forget...
    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    at the end


    In my case, i does'nt change any value with the secpol.msc or in the registry of my WinVista Ultimate OS.

    I hope this helps also
    Last edited by rj.2001; 17-11-2007 at 01:23.

  13. #13
    Quote Originally Posted by mlovelace View Post
    However, I seem to be missing a specific version of libsasl2.so
    [admin@BestCat init.d]$ ./S08samba
    /opt/sbin/smbd: can't load library 'libsasl2.so.2'
    /opt/sbin/nmbd: can't load library 'libsasl2.so.2'
    You must install the better ipkg!!!
    But after that, you must mostly reinstall many other packages! E.g. Nano

  14. #14
    I think you can upgrade all packages in one command with something like:

    ipkg upgrade

  15. #15
    It would also probably be a good idea to add "socket adress = ip", where ip is your br0 address (router LAN ip). Find it with 'nvram get lan_ipaddr' or 'ifconfig br0'.

    You don't want to leave all the security to the firewall.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 24
    Last Post: 05-05-2015, 07:42
  2. [HowTo] Install and configure Oleg's firmware
    By wengi in forum WL-500gP Tutorials
    Replies: 957
    Last Post: 22-02-2013, 22:24
  3. HowTo install OpenVPN server
    By Tamadite in forum WL-500g/WL-500gx Tutorials
    Replies: 41
    Last Post: 31-05-2012, 20:41
  4. [Howto] Install hddtemp
    By Denmike in forum WL-500gP Tutorials
    Replies: 11
    Last Post: 26-02-2012, 06:46
  5. Samba share accessible in XP but not Vista
    By goolias in forum WL-500gP Q&A
    Replies: 4
    Last Post: 05-11-2007, 14:07

Tags for this Thread

Posting Permissions

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