PDA

Bekijk de volledige versie : Samba in V1.9.2.7-10 and Vista



rj.2001
31-08-2008, 01:04
Hello,

I tried to get the internal Samba to work.
It works fine. But without username and passord.
The settings in the web interface are the following:


Samba File Shares: manual share list
Default Access Level: Hidden Read/Write
Host Name: WL500GP
Workgroup Name: MATRIX
DOS Codepage: 850 (Western Europe)


Added one share to test:

Directory: /tmp/harddisk/
Share name: harddisk
Access level: Read/Write
Description: USB 16GB Flash

and the /etc/smb.conf looks like:

[global]
interfaces = br0
bind interfaces only = yes
workgroup = MATRIX
server string = WL500gp
guest account = nobody
security = share
browseable = yes
guest ok = yes
guest only = yes
log level = 1
max log size = 100
encrypt passwords = no
preserve case = yes
short preserve case = yes
client code page = 850
coding system = utf8

[harddisk]
path = /tmp/harddisk
writable = yes
force user = root
comment = USB 16GB Flash

I add an smbpassword for the user root with smbpasswd.

The next step: modify the smb.conf in /etc/ and in /tmp/etc/.
Before I do that I added both files to my .files


echo /etc/smb.conf >> /usr/local/.files
echo /tmp/etc/smb.conf >> /usr/local/.files

But after I reboot the router, both files are the old one.
I think in V1.9.2.7-10 the files are generated at startup by Olegs-FW.

Can any one tell me, how I get the internal Samba to work with username and password. In other words: How can I add "security = user" in the smb.conf and save this file permanently?

Thanks for your help!

jplramalho
30-09-2008, 21:30
[global]
security = user
smb passwd file = /opt/etc/smbpasswd

Your issue is that the system need to be set to "security = User" instead of share and you need to create the users as well as assign passwords them passowrd with the the smbpasswd username tool.

You can also install the adduser tool as this makes life easier for the user creation.

hope this helps
JP