PDA

View Full Version : FC2 Samba prompts for password with share security


stefan_tech
2004-05-25, 07:09 AM CDT
Hi, I thought think would be fairly simple, I've done the same thing quite a bit under samba 2.x. However, I just can't figure out what I'm missing.

I have FC2 with stock samba. I'm trying to make a simple open share for use in my house.

These are two configs I've tried out of many:

[global]
workgroup = home
netbios name = server
security = share
[shared]
path = /home/shared
public = yes
writable = yes
----------------------
[global]
workgroup = home
server string = server
security = SHARE
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = /etc/printcap
dns proxy = No
[shared]
path = /home/shared
read only = No
guest ok = Yes
browseable = yes
printable = no

Every time I try to access the box from XP clients I'm prompted with a password dialog box with the username greyed out. If I punch in \\ip\share it seems to work alright. But why can't I just access the box and list shares?

(iptables is stopped btw.)

Thanks for any help. This one has really burned my brain...

-Stefan

micha
2004-05-25, 07:47 AM CDT
You should try to use system-config-samba and configure the invited account.

stefan_tech
2004-05-25, 09:15 PM CDT
Thanks for the quick reply. I tried just running the fc tool against my current config and then deleting the config and touch/ing an empty one. It still doesn't work right. XP clients are still asking for a password.

This is the config system-config-samba generated:

server string = server
password server = None
security = SHARE
guest ok = yes
workgroup = home
[Media]
comment = shared
path = /mnt/shared/Media
writeable = yes
guest ok = yes

Any other ideas appreciated!

stefan_tech
2004-06-03, 02:37 AM CDT
I posting a followup to my own message. I'm still having issues here and it's really starting to drive me up a wall. Since the first post I've reloaded the box with Debian just as a test and it worked fine. I missed the Redhat feel so I'm back on FC2 again. Now, after a complete reinstall and up2date I'm stuck with the same problem again.

XP Clients cannot connect to FC2. I keep getting a password dialog box that I cannot get rid of... This time around I strictly used the graphical tools and haven't touched anything by hand.

Below is a testparm dump. ANY ideas are greatly appreciated!!!

[global]
workgroup = Home
server string = Server
security = SHARE
password server = None
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = /etc/printcap
dns proxy = No
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
guest ok = Yes

[homes]
comment = Home Directories
read only = No
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No

[shared]
comment = shared
path = /home/shared
read only = No

JonR
2004-06-03, 05:14 AM CDT
If you get this sorted please post the fix. I've been struggling with Samba and FC1 for a couple of months now...

pawelgm
2004-06-07, 10:30 PM CDT
I am having the same problem. I am using the same config files as I did in RED HAT 9 and I am also using the shares with no password but both WIN 98 and XP prompt me for password when I try to connect :(

thepoch
2004-06-16, 09:31 PM CDT
This is a bug in Samba 3.0.3. A fix is in the works. Just got word on the fedora-test-list that Jay Fenlason is working on backporting some fixes from the next samba release (3.0.5) to 3.0.4.

pawelgm
2004-06-17, 01:32 AM CDT
Ohh good news I was going crazy tryinh to figure out whats going on

superbnerd
2004-06-17, 02:24 AM CDT
[/rant]
please noodies stop it. I hear too many noodies say they have a problem so they reinstall linux. THIS IS NOT WINDOWS!!! Reboots and reinstalations will not solve any problems (ever)! In linux you (almost) nerver have to reboot!
[/rant]
ok, on to the problem. as you mentioned, it is a bug, but there is a temporary work around if you are not on a large network:
1. as root, use smbuser command to make a user
2. go to /etc/samba and look for a file called user (something), open it. it should look like "user_name = names"
if the user u created is joe the edit the file to "joe = *"
that way when windows prompt for passwrd/usernae it will automaticly be joe.

sorry, if these instructions are hard to follow.

Abrocadabro
2004-06-21, 10:53 AM CDT
i used to have all those sorts of problems with samba on FC, but recently i installed ksambaplugin, it seems to be able to solve most of the problems if not all. i heard there are some registey files which you might get from the samba webiste and import them into windows, they amy solve the problems too.

i too have a question to ask, why my machine is not visible on the network but if you type //mymachine/ will get access to it? does any one encounter this problem b4?

thepoch
2004-06-21, 12:48 PM CDT
I've sorta solved this samba security=share problem... I've downgraded to FC1's samba 3.0.2 package instead. I would have used FC1's samba 3.0.4 update, but that has problems with my current security settings on our server (which has user based security).

So now my laptop running FC2 has FC1's samba 3.0.2 package. People can now easily browse it without being prompted for a password. Hope this helps somehow. It's a temporary solution, definitely. If you're not that concerned about security and bugs that may have been fixed in 3.0.4, this is an easy alternative.

JonR
2004-06-21, 03:15 PM CDT
I've sorta solved this samba security=share problem...

Could you post your smb.conf? - and do visit the poll http://www.fedoraforum.org/forum/showthread.php?t=17975

decals74
2004-06-21, 03:43 PM CDT
this config works for me with fc2 samba server and win2kpro and win2kadvserver clients. doesn't ask for any user/pass. sorry, i dont have any winxp machines to test with.

[root@mongo bin]# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[zz]"
Processing section "[ftproot]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

# Global parameters
[global]
workgroup = petty
server string = smb
interfaces = 192.168.0.0/24
security = SHARE
log file = /var/log/samba/%m.log
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
wins server = 192.168.0.254
idmap uid = 16733216-31154731
idmap gid = 16733216-31154731
hosts allow = 192.168.0., 127.

[zz]
path = /zz
read only = No
guest ok = Yes

[ftproot]
path = /zz/ftproot
read only = No
guest ok = Yes
[root@mongo bin]# rpm -qa | grep samba
samba-client-3.0.3-5
samba-common-3.0.3-5
samba-3.0.3-5
[root@mongo bin]# cat /etc/redhat-release
Fedora Core release 2 (Tettnang)
[root@mongo bin]# uname -a
Linux mongo 2.6.7-rc2 #1 Tue Jun 1 23:33:45 PDT 2004 i686 athlon i386 GNU/Linux

stefan_tech
2004-06-21, 08:29 PM CDT
[/rant]
please noodies stop it. I hear too many noodies say they have a problem so they reinstall linux. THIS IS NOT WINDOWS!!! Reboots and reinstalations will not solve any problems (ever)! In linux you (almost) nerver have to reboot!
[/rant]

[/rantrebuttal]
Just for clarification... I've been a diehard redhat user since 5.2... If you would have read my post I reloaded the box with Debian just to see if it was something different with Samba 3 or if it was a bug. Since I've been with RH so long I felt homesick and went back to FC2 and tried to fix it again.

...just to pour more salt on your wound I ended up reloading AGAIN with debian; it did start to grow on me ;-)

I'm really not trying to start a flamefest... I totally agree with you on not having to reload/reboot a box. I usually can get 100+ days uptime on my DESKTOP, once I am happy with the way it's set up.

Also, thanks for the info and fix. I did think I was going nuts when I was going through that.

thepoch
2004-06-21, 10:26 PM CDT
Could you post your smb.conf? - and do visit the poll http://www.fedoraforum.org/forum/showthread.php?t=17975

My smb.conf basically comes with defaults, except for "security=share", and my sole shared folder with full read-write access to everyone.

[shared]
path = /home/shared
public = yes
guest only = yes
guest ok = yes
writable = yes
printable = no
create mask = 0664
directory mask = 0775
force user = thepoch
force group = thepoch

This worked with FC1 using Samba 3.0.0 (original in ISO) all the way to 3.0.2. That was about the time I switched to FC2. It no longer worked there. I have a server in the office using FC1 that I've updated to 3.0.4, but that caused problems with our smb.conf (per user directory permissions, etc.), so I downgraded that to 3.0.2. That worked again. So I've also switched my FC2's samba to FC1's 3.0.2. Now it works.

robghealey
2004-06-25, 07:08 AM CDT
this config works for me with fc2 samba server and win2kpro and win2kadvserver clients. doesn't ask for any user/pass. sorry, i dont have any winxp machines to test with.

[root@mongo bin]# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[zz]"
Processing section "[ftproot]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

# Global parameters
[global]
workgroup = petty
server string = smb
interfaces = 192.168.0.0/24
security = SHARE
log file = /var/log/samba/%m.log
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
wins server = 192.168.0.254
idmap uid = 16733216-31154731
idmap gid = 16733216-31154731
hosts allow = 192.168.0., 127.

[zz]
path = /zz
read only = No
guest ok = Yes

[ftproot]
path = /zz/ftproot
read only = No
guest ok = Yes
[root@mongo bin]# rpm -qa | grep samba
samba-client-3.0.3-5
samba-common-3.0.3-5
samba-3.0.3-5
[root@mongo bin]# cat /etc/redhat-release
Fedora Core release 2 (Tettnang)
[root@mongo bin]# uname -a
Linux mongo 2.6.7-rc2 #1 Tue Jun 1 23:33:45 PDT 2004 i686 athlon i386 GNU/Linux


where would I find the numbers for idmap uid and idmap gid? Or is it always the same as the ones listed here?

Thanks,
Rob

tvolin
2004-09-02, 01:29 PM CDT
I ran into a similar problem when I migrated to FC2.
Here's how I worked around it.
Instead of using
security = share
I use:
security = user
map to guest = Bad User

On my share, I set
guest only = yes

So even if a user who has an smbpasswd tries to authenticate, they get guest-level access to that share.

From the smb.conf man page:
Note that the name of the resource being requested is not sent to the server until after the server has successfully authenticated the client. This is why guest shares don't work in user level security without allowing the server to automatically map unknown users into the guest account. See the map to guest parameter for details on doing this.

I don't know how to reconcile that with what thepoch said about a fix being in the works...

Good luck,
Troy

Ned
2004-09-02, 01:35 PM CDT
Nice workaround tvolin - thanks for sharing :)

...and welcome to FedoraForums :)

Ned