LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-25-2004, 11:57 AM   #1
thorax
Member
 
Registered: Jun 2004
Location: Germany
Posts: 73

Rep: Reputation: 15
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.
 
Old 07-25-2004, 04:26 PM   #2
atlesn
Member
 
Registered: Oct 2003
Location: Oslo, Norway
Distribution: RedHat 9.0, Fedora Core 1/2/3, Debian 3.0, Smoothwall
Posts: 110

Rep: Reputation: 15
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.

Last edited by atlesn; 07-25-2004 at 04:27 PM.
 
Old 07-25-2004, 06:30 PM   #3
hindenbergbaby
Member
 
Registered: Sep 2003
Location: Boston
Distribution: Gentoo, Slack, SuSE, Ubuntu... Flavor of the week
Posts: 134

Rep: Reputation: 15
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?
 
Old 07-26-2004, 04:19 AM   #4
thorax
Member
 
Registered: Jun 2004
Location: Germany
Posts: 73

Original Poster
Rep: Reputation: 15
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.
 
Old 07-26-2004, 10:38 AM   #5
thorax
Member
 
Registered: Jun 2004
Location: Germany
Posts: 73

Original Poster
Rep: Reputation: 15
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
 
Old 07-26-2004, 12:27 PM   #6
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
you don't have a workgroup name in the global section
 
Old 07-26-2004, 12:57 PM   #7
thorax
Member
 
Registered: Jun 2004
Location: Germany
Posts: 73

Original Poster
Rep: Reputation: 15
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?
 
Old 07-26-2004, 02:31 PM   #8
atlesn
Member
 
Registered: Oct 2003
Location: Oslo, Norway
Distribution: RedHat 9.0, Fedora Core 1/2/3, Debian 3.0, Smoothwall
Posts: 110

Rep: Reputation: 15
Make the workgroup the same as on the other boxes.
 
Old 07-26-2004, 06:38 PM   #9
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
have you done smbpasswd -a
for the windoze users?
 
Old 07-27-2004, 05:10 AM   #10
thorax
Member
 
Registered: Jun 2004
Location: Germany
Posts: 73

Original Poster
Rep: Reputation: 15
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.
 
Old 07-27-2004, 06:05 AM   #11
Simon_6162
Member
 
Registered: Jul 2004
Location: UK
Distribution: Fedora, Gentoo, Redhat Enterprise
Posts: 141

Rep: Reputation: 16
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
 
Old 07-27-2004, 07:01 AM   #12
thorax
Member
 
Registered: Jun 2004
Location: Germany
Posts: 73

Original Poster
Rep: Reputation: 15
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?
 
Old 07-27-2004, 07:16 AM   #13
atlesn
Member
 
Registered: Oct 2003
Location: Oslo, Norway
Distribution: RedHat 9.0, Fedora Core 1/2/3, Debian 3.0, Smoothwall
Posts: 110

Rep: Reputation: 15
No.

If your Windows username is XXX, do

smbpasswd -a XXX

and type the wanted password.
 
Old 07-27-2004, 05:12 PM   #14
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
the wanted password needs to be the same used on the windows box
 
Old 07-28-2004, 06:13 AM   #15
Kess78
Member
 
Registered: Jul 2004
Location: Switzerland
Distribution: Debi@n, SuSE
Posts: 36

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
WinXP cannot access samba shares from RH9 kc8tbe Linux - Software 24 02-20-2006 08:33 PM
WinXP Cannot Access RH9 Shares SpotsPaw Linux - Networking 8 01-24-2006 01:10 AM
Cannot connect to WinXP shares from samba on a Suse 9.1 box robintw Linux - Software 0 12-04-2004 12:06 PM
How to access Linux Shares from WINXP Pro? murbz Linux - Networking 4 07-17-2004 06:10 AM
access linux shares from winxp flynnhandley Linux - Networking 2 08-27-2003 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration