Page 1 of 1

Samba file sharing with password protection

PostPosted: Mon Mar 17, 2014 1:59 am
by Cjcr
Hello,

I'm trying to protect with password the /root/ folder (and maybe others if I get lucky) that is shared by default in MatrixTV (yocto/openbriks) but no success.

I've read the /etc/smb.conf file and it says:

Code: Select all
# To add a writable share with a specific user :
# create user 'joe' with :
#
# cp /etc/passwd /etc/passwd.bak
# cp /etc/group /etc/group.bak
# cp /etc/shadow /etc/shadow.bak
# echo "joe:x:1000:1000:joe:/home/joe:/bin/sh" >>/etc/passwd
# echo "joe:x:15020:0:99999:7:::" >>/etc/shadow
# echo "joe:x:1000:" >>/etc/group
# passwd joe
# mkdir /home/joe
# chown joe:joe /home/joe
# smbpasswd -a joe
#
#


I follow the above instructions and then uncomment the following lines:

Code: Select all
;[myshare]
;  path = /home/joe
;  browsable = yes
;  guest ok = no
;  writable = yes
;  username = joe


Now 'myshare' folder appear but when I type the password it says that is wrong. :evil:
Any idea? Anyone had success with this?

Thanks.