Search code examples
windows-7samba

Setting up SAMBA Share from CENTOS Directory to Windows 7


Setting up a Samba share has got to be one of the most complex and convoluted things I've ever engaged myself in doing - and yet it is so incredibly simplistic in terms of the program's complexity. I think the difficulty in setting it up is owing to the absolutely unbelievable amount of tutorials and 'configuration' guides available on the internet. I think I've found about 25 different ways to set up the samba share - all of them different and none of them working correctly.

Here is what IVE done so far and tell me if I'm out of my mind - at this point nothing would surprise me. So I already had samba installed on my CentOS distro. The following directory contains the location where I'd like the samba share to point to: "/x2"

I was told to do the following:

1) edit the smb.conf file and add the following configuration only:

[global]
workgroup = wrkgrp
netbios name = smbserver
security = SHARE
load printers = No
default service = global
path = /home
available = No
encrypt passwords = yes
[share]
writeable = yes
admin users = smbuser
path = /home/share (changed to "/x2")
force user = root
valid users = smbuser
public = yes
available = yes

2) Add user 'smbuser' and update password 3) Add user to samba server with "smbpasswd -a smbuser" and use same passwd as user 4) Restart samba server "/etc/init.d/smb restart" 5) Go to windows machine and run command "\"

After completing step 5 a folder shows up with a folder inside named "share". I double click on the folder and I am challenged for credentials. By default, the credentials are presented as "smbuser". I attempt to use the password I used for both the account creation and the samba account creation (steps 2 and 3) and I get the message "the specified network password is not correct" with the added bonus that now the user field for the login prompt is now prefaced with the domain name of my computer "\smbuser" and of course using the password I provided in steps 2 and 3 give me the same result as before.

There is an option to use another account, however I tried using the DOMAIN/account_name that I use to login to my computer in general and still no luck.

Does anyone have any insight? What am I doing wrong?


Solution

  • I cannot believe after all this - how simple and ridiculous the problem was. The password I was using was apparently the source of all my problems. The username "smbuser" and the password "SMBuser1" were not compatable.

    I changed the password, then changed it with the samba service, restarted samba server and re-added the share mapping using:

    NET USE Z: \192.168.1.250\share /USER:smbuser

    And that was it. Worked like a charm. Now I have a mapped drive and I believe I can run the IP host from the run prompt and use the username/password to scoot right in.