Samba
Hello,
I cannot understand the reason about samba sharing. I've got a RHEL6 server and a Windows7 Laptop. This is what I do 1. I create the user i will enable to look the directory and add a new pass useradd -g groupname username passwd username 2. in /etc/samba/smb.conf i add the following lines ### Samba - Relax ### [sharing_name] comment = Sharing directory for username browseable = yes path = /mainuser/shared_directory valid users = username writeable = yes guest ok = yes printable = no Note : The directory owner is "username" and group "groupname" , permission are 755 3. then i add to /etc/samba/smbusers groupname = username 4. last, i enable the user to access the directory smbpasswd -e username --- When I try from Windows to access it denies with an error message that describe i have no authorization to access. The password of "adduser" command and "smbpasswd" command it's the same. To access i do Start-->run i insert \\serveraddress\sharing_name --- My question about that : 1. It's necessary to add the user both with "adduser" and "smbpasswd" ? Why? 2. The user i created "username" it is the user i enable to access the directory. I do not need to have that user on windows but i have some confusion about that. 3. What am I Wrong? Thank you Davide |
Hi Davide,
What Unix username you've created? and are both your Windows and Unix systems can access each other or are in same network? In order to access Unix data from Windows, a user's Unix and Windows usernames should be mapped in smbusers. So did you map them in /etc/samba/smbusers, like: "windows-username"=="<unix-username" Also if systems are not in same domain name then you should try with path: \\<FQDN-Unix-system>\<dir> One more thing, as far as I know, entry of groupname is not needed in smbusers while configuring user to use samba. |
Now it works. I explain because i usually make a mountain out of a mole hill,
I was in trouble because I already did a samba sharing with "username2" and it was working. I couldn't understand at first instance. Then i found out that I was inside Windows7 as "username2" (an user i created and it works well for Samba sharing) , i switched to "username" and i tried to connect to the samba sharing so it worked out. Thanks Shiva! Davide |
All times are GMT -5. The time now is 04:45 AM. |