View Full Version : Problem accessing samba shares from Windows XP
Stang Man
05-27-2005, 02:53 AM
Hey everyone.....
I have a RedHat 7.3 box that has a directory being shared as well as a printer. My windows machine was able to access them a couple days ago without problems. Today, I reboot and all of a sudden it says I dont have the privelages to access them. I ended up reformatting my windows machine and I still have the problems. Why does Windows networking work only when it feels like it?
I can post my smb.conf in a bit
Do you not see the shares, or not see the Samba server, or do you not have write permission any more? Do you get errors in your samba logs?
scotty do
05-27-2005, 10:41 AM
Do you have a password setup on your winXP box? Or no password?
Is your samba share setup as guest?
Post your smb.conf
sandmanx
05-27-2005, 03:31 PM
Have you checked the Red Hat box and make sure that smbd and nmbd are running. I sometimes have to restart the service on my linux machine to get everything working right.
kill -HUP <pid of smbd>
and the same for nmbd
I'm guessing that isn't the problem but you at least want to check it bofore running through hoops.
Stang Man
05-27-2005, 04:37 PM
smbd and nmbd are running...
here is my smb.conf
http://marcin.fastlanehw.com/smb.conf
my windows XP login/password are the same as on the redhat box
http://marcin.fastlanehw.com/rhaptiva_notaccessible.gif
saterth
05-27-2005, 05:26 PM
on first look i see 3 of these
security=user
security=share
secutiry=share
i think you should only set this once at the begining of the conf file. The extra 2 near the middle and end may cause some problems. Remove the extra's and set the first one and should be working again.
the samba services need to be restarted after any changes to the conf file are made.
Stang Man
05-27-2005, 05:55 PM
on first look i see 3 of these
security=user
security=share
secutiry=share
i think you should only set this once at the begining of the conf file. The extra 2 near the middle and end may cause some problems. Remove the extra's and set the first one and should be working again.
the samba services need to be restarted after any changes to the conf file are made.
ok, I remove the last 2 "security=share" and it still doesn't work, I restarted smb completely.. (service smb restart)
Some Llama
05-27-2005, 06:36 PM
some thing to check would be:
Can you ping the redhat box? Does the network name resolve?
The windows error is basically saying it can't see this system on your network.
if you can ping the server and resolve the network name (try pinging the network name if the ip address is able to be pinged) then you want to check the permissions of the folder/printer you are trying to access...
Stang Man
05-27-2005, 11:06 PM
I can ping and SSH into it no problems... It's a permissions problem and I don't know what to do about it.
Bullitt
05-28-2005, 01:00 PM
Change the debug level of the samba service to something a tad higher
Insert this into your global section ex:
[global]
debug level = 1
Then "tail -f /var/log/samba/log.yourwindowscomputernamehere" file and then try to access your shares with windows while keeping an eye on the output from the logs. If you dont see anything, change the debug level to 2, restart the samba service, access share, view log, rinse repeat until you see some error (or success) messages.
This helped me solve a persistant error with my computers not being able to view the shares. I had an improper setting in place.
Some Llama
05-28-2005, 01:07 PM
^^ good suggestion.
Yah so you might also want to check the default dirctory for your windows username share, if it is at a lower level directory than the printer you could have problems.
e.g the printer is at /dev/print but the user logs into /home/username
I think ou could resolve that ^^ by just cding to /dev and chmod g+rw or o+rw
Stang Man
05-28-2005, 01:57 PM
Change the debug level of the samba service to something a tad higher
Insert this into your global section ex:
[global]
debug level = 1
Then "tail -f /var/log/samba/log.yourwindowscomputernamehere" file and then try to access your shares with windows while keeping an eye on the output from the logs. If you dont see anything, change the debug level to 2, restart the samba service, access share, view log, rinse repeat until you see some error (or success) messages.
This helped me solve a persistant error with my computers not being able to view the shares. I had an improper setting in place.
Here's what I get:
root@rhaptiva ~ # tail -f /var/log/samba/stacker.log
[2005/05/22 09:21:47, 0] param/loadparm.c:lp_do_parameter(2687)
Global parameter security found in service section!
[2005/05/22 09:24:21, 0] smbd/server.c:sig_hup(384)
Got SIGHUP
[2005/05/22 09:24:21, 0] param/loadparm.c:lp_do_parameter(2687)
Global parameter security found in service section!
[2005/05/22 13:02:13, 0] smbd/service.c:make_connection(248)
stacker (192.168.1.25) couldn't find service ::{2227a280-3aea-1069-a2de-08002b30309d}
[2005/05/22 13:02:20, 0] smbd/service.c:make_connection(248)
stacker (192.168.1.25) couldn't find service ::{2227a280-3aea-1069-a2de-08002b30309d}
but there's a problem... Back then it worked, today is 5/28 and it's not working :confused: and it won't log anything newer to it.. (I tried both debug levels)
Bullitt
05-28-2005, 04:51 PM
I believe the debug level goes all the way up to 10.
Could you perhaps post your smb.conf?
Did you change your windows computer name? when you go into the /var/log/samba and do an "ls -lt" command, what's the newest file? Thats the file you should "tail -f" as you try to access it with the debug level of 1 or 2. That will point out any permission errors.
Mine looks a little like this for troubleshooting:
[global]
log file = /var/log/samba/log.%m
debug level = 1
syslog = 0
I'd suggest you have those lines in your global stanza to troubleshoot. All is not lost if you have syslog = 1 do a "tail -f /var/syslog" (as root, probably) and then investigate your shares.
Stang Man
05-29-2005, 01:55 PM
I deleted my log file for %m.log and now it won't generate a new one or use one I made with touch.
my Windows computer name is exactly the same, and I posted my smb.conf in my first reply (along with the screenshot of the error)
saterth
05-30-2005, 11:16 AM
Have you looked at your permissions/owner on /usr/rhel4/ yet?
Bullitt
05-30-2005, 09:06 PM
Have you looked at your permissions/owner on /usr/rhel4/ yet?
[rhel4]
path = /usr/rhel4/
guest ok = yes
writeable = yes
security = share
I'd agree. Permissions on that directory (/usr/rhel4) should be world executable (samba has to descend into the dir) and world readable (samba has to read the directory). So a chmod 755 or something like that (ending in 5) should be appropriate to grant read-only privs to that directory.
Stang Man
05-30-2005, 11:34 PM
Have you looked at your permissions/owner on /usr/rhel4/ yet?
[rhel4]
path = /usr/rhel4/
guest ok = yes
writeable = yes
security = share
I'd agree. Permissions on that directory (/usr/rhel4) should be world executable (samba has to descend into the dir) and world readable (samba has to read the directory). So a chmod 755 or something like that (ending in 5) should be appropriate to grant read-only privs to that directory.
drwxr-xr-x 6 root root 4096 May 21 19:04 rhel4
I still can't access it :(
Bullitt
05-30-2005, 11:52 PM
in the /var/log/samba dir, are there _any_ log files being created/updated? You had one that was for your PC, but it hasnt updated in a week. Are you out of space on any of your partitions? "df" or out of inodes "df -i"
Stang Man
05-31-2005, 01:15 AM
in the /var/log/samba dir, are there _any_ log files being created/updated? You had one that was for your PC, but it hasnt updated in a week. Are you out of space on any of your partitions? "df" or out of inodes "df -i"
/dev/hda3 128844 58920 63272 49% /
/dev/hda1 19487 5811 12670 32% /boot
/dev/hda6 908760 16620 845976 2% /home
none 31052 0 31052 0% /dev/shm
/dev/hdc1 8119744 4869536 2837744 64% /usr
/dev/hda5 1031800 49500 929888 6% /var
I obviously have PLENTY of space....
the only log files being updated are log.nmbd, log.smbd, and smbd.log (WTF?)
Stang Man
06-02-2005, 09:20 PM
bump
saterth
06-03-2005, 12:50 PM
i think you logging problems may be caused your smb.conf file settings.
max log size = 0
shouldn't this be like 50 or something that suits your system more.
Stang Man
06-03-2005, 02:25 PM
i think you logging problems may be caused your smb.conf file settings.
max log size = 0
shouldn't this be like 50 or something that suits your system more.
0 = unlimited, does it not?
saterth
06-03-2005, 06:47 PM
yup, you are right. It was right there in the documention. If I had even bothered to look it up. I have never seen anyone use it, so i questioned it. sorry about that.
Have you tried to start a new smb.conf file with the absolute basics to share a different test directory. If you can share a different directory properly, then we can narrow down where to continue looking for problems.
vBulletin® v3.8.2, Copyright ©2000-2010, Jelsoft Enterprises Ltd.