OUR NETWORK:TiVo Community TechLore Explore3DTV DVRplayground Dijit Community See all... About UsAdvertiseContact Us

 
Learn about scoring Forum's Raw Score: 196120.0
January 11, 2011 11:14 AM

Categories: DD-WRT

Rating (0 votes)
  • 1
  • 2
  • 3
  • 4
  • 5
Rate This!

Member Avatar

kt_haddock

Member
Joined: 12/08/2010

I'm trying to set up some options in Samba server but I don't get User2 to work.
Only User1 and Public. What have I written wrong ? I'm on build 15962-mega

[Global]

server string = rt-n16
workgroup = workgroup
interfaces = br*                 <<<=== does this work with 15962-mega ?                
bind interfaces only = Yes
map to guest = Bad User
smb passwd file = /var/samba/smbpasswd
private dir = /var/samba
passdb backend = smbpasswd
log file = /var/smbd.log
max log size = 1000
printing = none
load printers = No
usershare allow guests = Yes
socket options = TCP_NODELAY IPTOS_LOWDELAY


[User1]
comment = User1 share
path = /mnt/User1
read only = No
guest ok = No
valid users = User1

[User2]
comment = User2 share
path = /mnt/User2
read only = No
guest ok = No
valid users = User2

[Public]
comment = Public Share
path = /mnt/public
read only = No
guest ok = Yes
guest only = Yes

Regards
kt_haddock

Discussion:    Add a Comment | Comments 1-10 of 10 | Latest Comment

January 11, 2011 12:32 PM

Looks fine to me, if you log in via ssh, do you see the two user entries in:

/etc/passwd

What are the permissions of /mnt/User2

ls -la /mnt/User2

January 11, 2011 2:06 PM updated: January 11, 2011 2:36 PM

This in /etc/passwd :
user1:*:1000:1000:user1:/var:/bin/false
user2:*:1001:1001:user2:/var:/bin/false

root@NOD-E36-01:~# ls -la /mnt/User2
drwxr-xr-x    2 root     root        16384 Jan 11 21:01 .
drwxr-xr-x    5 root     root        16384 Jan 11 21:00 ..
-rwxr-xr-x    1 root     root           12 Jan 11 17:28 user2.txt

That what I get

And this in Custom Configuration box:

[global]
server string = rt-n16
workgroup = workgroup&#9;&#9;&#9;&#9;&#9;&#9;&#9;
interfaces = br*&#9;&#9;&#9;&#9;
bind interfaces only = yes
map to guest = Bad User
smb passwd file = /var/samba/smbpasswd
private dir = /var/samba
passdb backend = smbpasswd
log file = /var/smbd.log
max log size = 1000
printing = none
load printers = no
usershare allow guests = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY

[user1]
comment = user1 share
path = /mnt/user1
read only = no
guest ok = no
valid users = user1

[user2]
comment = user2 share
path = /mnt/user2
read only = no
guest ok = no
valid users = user2

[public]
comment = public Share
path = /mnt/public
read only = no
guest ok = yes
guest only = yes

January 11, 2011 4:47 PM updated: January 12, 2011 5:11 AM

root@NOD-E36-01:~# ls -la /mnt
drwxr-xr-x 5 root root 16384 Jan 11 21:00 .
drwxr-xr-x 16 root root 162 Dec 24 02:18 ..
drwxr-xr-x 2 root root 16384 Jan 11 21:01 public
drwxr-xr-x 2 root root 16384 Jan 11 21:01 user1
drwxr-xr-x 2 root root 16384 Jan 11 21:01 user2

root@NOD-E36-01:~# ls -la /mnt/user2
drwxr-xr-x 2 root root 16384 Jan 11 21:01 .
drwxr-xr-x 5 root root 16384 Jan 11 21:00 ..
-rwxr-xr-x 1 root root 12 Jan 11 17:28 user2.txt

I haven't mention I tested with FAT32 USB

January 12, 2011 5:24 AM

Fat32:-) Add this line to your [user2] definition:

force user = root

e.g.:

[user2]
comment = user2 share
path = /mnt/user2
read only = no
guest ok = no
valid users = user2
force user = root

January 12, 2011 5:53 AM

When I put "force user = root" to user2 then I get write acess to user2 I only testing with FAT32 I   usually use Ext3 who is much faster.

I have found this in your older threed, can this be the problem ?

If you first connect to Share1 and then to Share2 Windows is still holding a
connection to Share1 and that is why Wikndows tells you that you cannot
connect multiple times with different users, see the error message:-)
So this is purely a windows problem, which can solved for example through a reboot.

Is there any other way to "relese" holding ?

regards
kt_haddock

 

January 12, 2011 6:43 AM

It sometimes works if you disconnect the network share by rightclicking on the share.

The problem why you need force user = root is that by default samba accesses the drive as the specified user in case of fat32 dd-wrts default is to mount a fat32 as root without setting an umask so other users have rights.
In my previous builds I did mount a fat32 partition with umask, but as dd-wrt guys did not follow my way and since I want to comply with dd-wrt as much as possible I adopted dd-wrts way. The less differences I have the easier I can merge in their updates.

January 12, 2011 6:55 AM

Okey
Is this only related to Fat32, with Ext3 I don't need to do put forced user in?
I have "force user = root" in user1, user2 and public then I get write access to them. Have I get this right ?

January 12, 2011 7:38 AM

If I reboot Pc and try access my samba share public, then I have to give user and password to get access to public and user1 or 2 depend wich password I get

January 12, 2011 8:11 AM updated: January 12, 2011 2:34 PM

@Kong

I tested again. Put samba settings in custom configuration box and rebot PC I can't browse public folder I have to login with either user1 or user 2 login. after that I can use public but I still have to login to user1 or user 2.

What is the different between your build and that I'm testing with, 15962-mega ? Fat32 I knowing but more ?

Ragards

kt_haddock

January 29, 2011 8:24 AM updated: January 29, 2011 10:53 AM

I have tseted much more and It's working if I use Vista.
When I tested from my windows 7 ultimate x64 I have to set user/password to reach public folder.  Using Ext3 filesystem
I have set:
HKLM\System\CCS\Services\LanmanWorkstation\Parameters
            DWORD  DomainCompatibilityMode = 1
            DWORD  DNSNameResolutionRequired = 0

Have set "Network security: LAN Manager authentication level" to "1"
I still get login "windows security" and "assign networkpassword"

If I just put ex: user: "a" password: "a" then I can reach public
>>> How to set a blank password to public ??? <<<

Now I'm out of ideas

Regards
kt_haddock

Discussion:    Add a Comment | Back to Top | Comments 1-10 of 10 | Latest Comment

Add Your Reply

(will not be displayed)

Email me when comments are added to this thread

 
 

Please log in or register to participate in this community!

Log In

Remember

Not a member? Sign up!

Did you forget your password?

You can also log in using OpenID.

close this window
close this window