PDA

Bekijk de volledige versie : Restrict access to Samba shares



Muyz
03-05-2005, 21:32
I installed Samba on my WL500gx and I am able to read/write files to the attached USB harddisk as a guest user. Since my router also connects to my neighbour's network, I would like to restrict access. Any suggestions on how to achieve this?

Hmmm..no reactions so far. I tried adding a user to /etc/passwd and /etc/smbpasswd, but it is overwritten...

ranskis
08-06-2005, 23:41
Maybe others have a more elegant way of doing it, but here's what you can do :

use post-boot to create new users in /etc/passwd (and smbpasswd if needed)
put this in /usr/local/sbin/post-boot
echo 'joe:$1xxxxxxxxxxxx:4:4::/opt/joe:/bin/sh' >> /etc/passwd

Of course you have to use the correct encrypted password

TuTu
09-06-2005, 06:34
/etc/group too? :p

echo 'users:x:1000:joe' >> /etc/group

can login with ssh as well :o