LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Setting up Samba (https://www.linuxquestions.org/questions/linux-software-2/setting-up-samba-637411/)

matsko 04-23-2008 09:18 PM

Setting up Samba
 
I setup samba on my CentOS box with a regular:

# yum install samba

then I configured the configuration like so...

[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
force user = root
valid users = smbuser
public = yes
available = yes

then afterwards I added a user called smbuser and then set a password for it. Then I also setup the same smbuser for using smbpasswd -a smbuser.

Then a start/restart call (service smb restart)

So far everything looks fine, but the actual connectivity to that server doesn't work when I added from Windows XP (\\ip\share).

I tried resetting the firewall, but nothing seems to work.

Any ideas?

billymayday 04-23-2008 09:20 PM

So what happens when you try and connect from Windows?

matsko 04-24-2008 12:23 AM

Well the connection lags as if it has to wait (some sort of server or even client timeout).

Then it returns the message that the folder \\ip\share is not accessible. You might not have permissions to access this network resource. Contact the administrator for permission.

Anyways I think that I have the windows aspect semi-correct - I just need to figure out how to get the login credentials into the connection from windows to linux.

I would assume that Windows would open a login terminal window that asks for the username and password. Or does that need to be configured within the smb.conf file?

billymayday 04-24-2008 12:41 AM

When you try to map the drive, is there an option below "reconnect at login" to connect as a different user?

You shoudl be able to put the username in there.

Also check directory permissions on the server, and test it with SELinux temporarily disabled (setenforce 0)

Electro 04-24-2008 01:51 AM

That setup is bad because you are telling every user to be root in their own directory. Also the security is set to share and probably one of the reasons why it is not working. If you want your setup to work, you need users for the security option. I do not suggest putting path in global. The section global is the default settings for your smb/cifs server that will be applied to each shared directory.

I suggest refer to the example smb.conf file. I also suggest use webmin to help setup samba.

A good site that has informative howtos is at the following URL.

http://www.linuxtopia.org/


All times are GMT -5. The time now is 09:04 AM.