LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Samba: Can't access shares with WinXP (https://www.linuxquestions.org/questions/linux-software-2/samba-cant-access-shares-with-winxp-209471/)

thorax 07-25-2004 11:57 AM

Samba: Can't access shares with WinXP
 
Hi@all!
I'm using Mandrake 10 with Samba 3.0.2a, and I'm not able to access the shares on my Linux pc from a Windows XP pc. Everytime I try, I get a messagebox, saying that I do not have privileges to access the directory. The $printers directory is accessible, however, it contains no other preferences in the smb.conf than the share I created myself and cannot enter now.
The samba manual told me that, even with the 'security = share' option which I can set in SWAT, I must have same user accounts on both the linux and Windows pc. I've done that too, but it still doesn't work. Accessing Windows shares from the Linux pc works well, by the way.

atlesn 07-25-2004 04:26 PM

This is my setting for a RH9-box which shares a dir.

[global]
workgroup = WORKGROUP
netbios name = PC
server string = Samba Server
interfaces = 192.168.0.0/255.255.255.0
security = SHARE
encrypt passwords = Yes
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
unix password sync = Yes
log file = /var/log/samba/%m.log
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No

[public]
comment = Public Stuff
path = /home/public
read only = No
guest ok = Yes

No password/username-stuff is needed.

hindenbergbaby 07-25-2004 06:30 PM

I just went through this today. My firewall was causing all the problems... I opened up port 139 and set the SuSE firewall so that it knew I was using my Linux box as a Samba server, and it's been smooth sailing since.

Try taking down the firewall (just for a minute) and see if you can connect that way. Are you able to ping the Linux box with the XP box?

thorax 07-26-2004 04:19 AM

I do not have a firewall enabled, since my router has one ;)
What confuses me, is that the Winwos box doesn't even ask for a password, it just says that I do not have the rights to access the share. When I try to connect to the share with another Linux box, he asks for a username and password.

Well, I'll compare my smb.conf and atlesn ones.

thorax 07-26-2004 10:38 AM

OK, it still doesn't work. The problem that I can't even enter an username/password on the windows machine is definitely Windows' fault (again), since I can enter this stuff when trying from a linux box.

Here's my smb.conf, maybe someone finds something interesting in there:)



# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2004/07/25 18:50:12

# Global parameters
[global]
netbios name = LINUX1
server string =
security = SHARE
map to guest = Bad Password
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = cups
dns proxy = No
ldap ssl = no
printer admin = @adm
printing = cups

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
browseable = No

[print$]
path = /var/lib/samba/printers
write list = @adm, root
inherit permissions = Yes
guest ok = Yes

[pdf-generator]
comment = PDF Generator (only valid users)
path = /var/tmp
printable = Yes
print command = /usr/share/samba/scripts/print-pdf %s ~%u //%L/%u %m %I "%J" &

[hp_deskjet_400]
comment = HP DeskJet 400 Foomatic/hpijs
path = /var/spool/samba
read only = No
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
printer name = hp_deskjet_400
oplocks = No
share modes = No

[dl]
path = /home/mod/Downloads
inherit permissions = Yes
guest ok = Yes

Finlay 07-26-2004 12:27 PM

you don't have a workgroup name in the global section

thorax 07-26-2004 12:57 PM

Uhmmm... But SWAT shows me that I'm member of WORKGROUP. And when I browse the smb network, my box apperas in WORKGROUP. But I'll add this to smb.conf, simply 'workgroup = WORKGROUP', or what?

atlesn 07-26-2004 02:31 PM

Make the workgroup the same as on the other boxes.

Finlay 07-26-2004 06:38 PM

have you done smbpasswd -a
for the windoze users?

thorax 07-27-2004 05:10 AM

Okay, I made a smb.conf from scratch, here it is:

Quote:

[global]
netbios name = pc1
server string = Samba
workgroup = WORKGROUP
security = share
log file = /var/log/samba.log
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
wins support = yes

[Trash]
path = /tmp
guest ok = yes
writeable = yes
Accessing Trash works without user/password, but when I try to access a share below my (or another) home directory, it asks for a password. I read several howto's, but none helped me in this issue.

Simon_6162 07-27-2004 06:05 AM

have you got the widows user mapped to a unix user ? and does that unix user have the right to browse the home directory? if not you may have to do a chmod

thorax 07-27-2004 07:01 AM

Do you mean, that I have to create a user on the windows machine with the same name of the user to who the home directory on the unix machine belongs?

atlesn 07-27-2004 07:16 AM

No.

If your Windows username is XXX, do

smbpasswd -a XXX

and type the wanted password.

Finlay 07-27-2004 05:12 PM

the wanted password needs to be the same used on the windows box

Kess78 07-28-2004 06:13 AM

Hi, your smb.conf seems to be correct.
You don't need to add users with smbpasswd -a because you grant access to the guest user (everyone).
I can see that you want to share the "/home/mod/Downloads" directory. Try to type "ls -la /home/mod" and watch the rights (UNIX rights) to the Downloads directory. To be sure type "chmod 777 /home/mod/Downloads -R". Doing so will open this directory in Full control to everyone.

Try, bye Kess.


All times are GMT -5. The time now is 06:24 AM.