So I went to System > Administration > Server Settings > Samba and added a folder to share and initially set it to guest access to get things going.
I couldn't access this one and only share on this server with guest access from either my Windows laptop (XP Pro SP3) or a Leopard server (10.5.8) so I changed the settings to use user authentication and added my local user details (this is a stand alone file server with one user and the root user running CentOS 5.4).
I made sure I hadn't put the entries in iptables incorrect by stopping iptables (sudo /etc/init.d/iptables stop, which executed just fine). SELinux kept popping up so I disabled that and restarted the server also. So now with no iptables nor SELinux enabled flicking between guest and user access I still can't access the share (I have also tried authenticating as root to no avail), my Windows and Mac test machines are erroring out saying they don't have permissions to access the share (I am an administrator on both machines so its not a local permissions issue).
There are no firewall restrictions between my test machines and the CentOS server as I would even get prompted for authentication so that's not a problem and my test machines work fine because I can mount smb shares on other files servers in the same subnet as the CentOS server, what's going on?
Ideas are welcome! Thanks for reading...
Quoting James Bensley jwbensley@gmail.com:
So I went to System > Administration > Server Settings > Samba and added a folder to share and initially set it to guest access to get things going.
I couldn't access this one and only share on this server with guest access from either my Windows laptop (XP Pro SP3) or a Leopard server (10.5.8) so I changed the settings to use user authentication and added my local user details (this is a stand alone file server with one user and the root user running CentOS 5.4).
I made sure I hadn't put the entries in iptables incorrect by stopping iptables (sudo /etc/init.d/iptables stop, which executed just fine). SELinux kept popping up so I disabled that and restarted the server also. So now with no iptables nor SELinux enabled flicking between guest and user access I still can't access the share (I have also tried authenticating as root to no avail), my Windows and Mac test machines are erroring out saying they don't have permissions to access the share (I am an administrator on both machines so its not a local permissions issue).
There are no firewall restrictions between my test machines and the CentOS server as I would even get prompted for authentication so that's not a problem and my test machines work fine because I can mount smb shares on other files servers in the same subnet as the CentOS server, what's going on?
Ideas are welcome! Thanks for reading...
Get output from testparm and attach it (on text format) to this message.
-- Eero
The server is called Mars with one user, Mars!
[mars@mars ~]$ testparm Load smb config files from /etc/samba/smb.conf Processing section "[homes]" Processing section "[printers]" Processing section "[hestia]" Loaded services file OK. Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions
[global] workgroup = MY GROUP server string = Mars passdb backend = tdbsam guest account = mars username map = /etc/samba/smbusers guest ok = Yes cups options = raw
[homes] comment = Home Directories read only = No browseable = No
[printers] comment = All Printers path = /var/spool/samba printable = Yes browseable = No
[hestia] path = /backups/hestia read only = No [mars@mars ~]$
This is the repeating entry from my smbd.log from every time I try to mount the share via samba;
[2009/12/01 09:32:59, 0] lib/util_sock.c:get_peer_addr(1224) getpeername failed. Error was Transport endpoint is not connected
I had read online that this can be caused by samba not making its mind up about weather to use TCP ports 139 or 445 so I set it statically from within the smb config file by using "smb ports = 445" and "smb ports 139" restart after each change and checking if this had fixed my problem but it has not.
Hmm some progress has been made.
I removed the smb.conf file and wrote a new one manually but for some reason it only wants to let me connect as "Guest" and not a real user with some privileges?
[global] workgroup = my group server string = Mars netbios name = Mars security = SHARE load printers = no encrypt passwords = yes guest ok = no
[home] path = /home/mars writeable = yes valid users = mars public = no available = yes printable = no
2009/12/1 James Bensley jwbensley@gmail.com:
I removed the smb.conf file and wrote a new one manually but for some reason it only wants to let me connect as "Guest" and not a real user with some privileges?
Have you got SELinux enabled?
Ben
No I haven't but thanks for having a guess xD
2009/12/1 James Bensley jwbensley@gmail.com:
No I haven't but thanks for having a guess xD
Worth a shot! :-) I've wasted far too much time in the past on a new samba server only to realise I'd forgotten to disable SELinux.
What permissions do you have set on /home/mars?
Ben
Quoting James Bensley jwbensley@gmail.com:
Hmm some progress has been made.
I removed the smb.conf file and wrote a new one manually but for some reason it only wants to let me connect as "Guest" and not a real user with some privileges?
try with log level = X (Sets the amount of log/debug messages that are sent to the log file. 0 is none, 3 is considerable.)
and then read the logs.
-- Eero
2009/12/1 James Bensley jwbensley@gmail.com:
I removed the smb.conf file and wrote a new one manually but for some reason it only wants to let me connect as "Guest" and not a real user with some privileges?
Okay... had a closer look and suggests that your users are not authenticating properly.
Have you created samba accounts for the linux users you wish to have access? See http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-samba-configurin...
As Eero suggests, increase your logging level.
Ben
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of James Bensley Sent: Tuesday, December 01, 2009 4:39 AM To: CentOS mailing list Subject: Re: [CentOS] Unable to share directory via Samba?
This is the repeating entry from my smbd.log from every time I try to mount the share via samba;
[2009/12/01 09:32:59, 0] lib/util_sock.c:get_peer_addr(1224) getpeername failed. Error was Transport endpoint is not connected
I had read online that this can be caused by samba not making its mind up about weather to use TCP ports 139 or 445 so I set it statically from within the smb config file by using "smb ports = 445" and "smb ports 139" restart after each change and checking if this had fixed my problem but it has not.
-- Regards, James ;)
Samuel Goldwyn - "I'm willing to admit that I may not always be right, but I am never wrong." - http://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
---- Try ports = 445 in /etc/smb.conf or "disable netbios = yes" Make sure for your config you have you add the user mars to the tdbsam pass word backend.
John
Thanks for all the input everyone,
Basically I trashed the smb.conf and the folder I wanted to share, restarted the machine, re-wrote the smb.conf (again) and re-made the directory and set permissions etc, restarted the machine and all is well!
Thanks all for your input it has helped me write an improved smb.conf on my original attempt!