OpenWrt Forum Archive

Topic: Configure Samba

The content of this topic has been archived on 29 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Samba3 installed in the router TP-LINK TL-WR1043ND + OpenWRT 10.03.1, with the authentication mode off (= no guest_ok) have normal access shared folders, but can not access the folder if authentication mode is enabled ((guest_ok = yes), always says: "the specified network password is not correct," how do I get him to accept the username and password? following configuration files:

#/etc/samba/smb.conf.template
[global]
    netbios name = teste
    workgroup =lan
    server string = teste
    syslog = 10
    encrypt passwords = true
    passdb backend = smbpasswd
    obey pam restrictions = yes
    socket options = TCP_NODELAY
    unix charset = ISO-8859-1
    preferred master = yes
    os level = 20
    security = share
    guest account = nobody
    invalid users = root
    smb passwd file = /etc/samba/smbpasswd

#/etc/samba/smb.conf
[global]
    netbios name = teste
    workgroup =lan
    server string = teste
    syslog = 10
    encrypt passwords = true
    passdb backend = smbpasswd
    obey pam restrictions = yes
    socket options = TCP_NODELAY
    unix charset = ISO-8859-1
    preferred master = yes
    os level = 20
    security = share
    guest account = nobody
    invalid users = root
    smb passwd file = /etc/samba/smbpasswd

[PASTA1]
        path = /mnt/pasta2/pasta1
        valid users = user1,user2
        read only = yes
        guest ok = yes
        create mask = 0700
        directory mask = 0700

[PASTA2]
        path = /mnt/pasta2
        valid users = user2
        read only = no
        guest ok = yes
        create mask = 0777
        directory mask = 0777

#/etc/config/samba
config 'samba'
        option 'name' 'teste'
        option 'description' 'teste'
        option 'workgroup' 'lan'
        option 'homes' '0'

config 'sambashare'
        option 'read_only' 'yes'
        option 'create_mask' '0700'
        option 'dir_mask' '0700'
        option 'name' 'PASTA1'
        option 'path' '/mnt/pasta2/pasta1'
        option 'guest_ok' 'yes'
        option 'users' 'user1,user2'

config 'sambashare'
        option 'name' 'PASTA2'
        option 'path' '/mnt/pasta2'
        option 'read_only' 'no'
        option 'create_mask' '0777'
        option 'dir_mask' '0777'
        option 'guest_ok' 'yes'
        option 'users' 'user2'

# /etc/passwd
root:xxxxxxxxxxxxxxxx.:0:0:root:/root:/bin/ash
ftp:*:55:55:ftp:/home/ftp:/bin/false
network:*:101:101:network:/var:/bin/false
nobody:*:65534:65534:nobody:/var:/bin/false
daemon:*:65534:65534:daemon:/var:/bin/false
user1:*:1000:65534:user1:/var:/bin/false
user2:xxxxxxxxxxxxxx:1001:0:user2:/root:/bin/ash

# /etc/samba/smbpasswd
user2:1001:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:91327A61ABBD9DD3E02767FE0931F9EE:[U          ]:LCT-00000001:
user1:1000:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:B41053E77A2C77CA1D7BB43B72C985C3:[U          ]:LCT-00000001:

I used the command to create the samba user:
smbpasswd user1 [senha]
smbpasswd user2 [senha]

Hi,
I'm using Netgear WNDR3800 since 2 month and work step by step to reach the functionality of the original Netgear firmware with 10.03.1.
Thanks for your good documentation. I'm using PC's since MS-DOS 1.0 and currently WinXP/Vista/Win7.
But with Samba3, I had the same problem with "not correct password". I had users working fine and others not working.
All setups with user/share mode, changing registriy, local group policies - still errors!
Yesterday I analyse the users password and found out: when ever the user has a password with special chars like ยง$%& etc. the user get the error message. I search the web and forums and found no answer. so I made some tests and found out:

smbpasswd [user] [password] - The password needs to be set in single quotation marks, example 'p@$$w0rd'

after this everthing works fine. you only need the "net use" command on windows and user and password is transfered to samba and you are allowed to use the recources on the server.
Might be every unix freak knows about this. sorry I'm from the windows world. Please extend the wiki/dokumentation.
Hope this helps also on your side.
greetings from germany
chris5560

The discussion might have continued from here.