Welcome to WebmasterWorld Guest from 62.210.77.51
Forum Moderators: bakedjake
My first question is, since I've setup this samba share to be public why does it keep prompting for a password when a password is not needed? How can I get ride of this prompt? BTW, this occurs on a Windows 2000/XP machines. Haven't needed to test it on the other OSs at present.
My second question is, how can I make this share allow people when they get into the /usr/files/storage/incoming/ sub-directory to upload files but not delete or modify them? If I have to allow for deleting to have uploading then that is fine. I just do not want to have to make everyone go to a entirely separate share just to upload files to the server.
Here's by configuration of the samba share below....
[storage]
comment = Storage (public files)
writable = no
path = /usr/files/storage
public = yes
only guest = yes
guest account = nobody
browsable = yes
guest ok
If this parameter is yes for a service, then no password is required to connect to the service. Privileges will be those of the guest account.
and:
guest only
If this parameter is yes for a service, then only guest connections to the service are permitted. This parameter will have no effect if "guest ok" is not set for the service.
As to your second question, a share is either writeable or not, and subdirs inherit this property. I think you can make the share writeable and chmod the individual subdirectories to control/limit access.
guest ok
Mmmm.. okay but I thought "guest ok=yes" is a synonym of public. I tried adding "guest ok = yes" and nothing changed. I even kill the processes of nmbd/smbd and restarted them. Here's what I haven now.
[storage]
comment = Storage (public files)
writable = yes
path = /usr/files/storage
public = yes
guest ok = yes
guest only = yes
guest account = nobody
browsable = yes
guest only/only guest
I totally agree but since I have public this should not be a problem. Public or guest ok are synonyms. I have both to see if that helped but nothing has changed. It is still asking for username/password.
Incoming Directory
I would agree. But I tried that but no success. I originally had only a symbolic link to the sub-directory I wanted guest users to be able to upload to. So I figured that might be an issue so I moved the directory in, no difference. Here's what it looks like, maybe I'm out to lunch here but it still doesn't allow me to put files in the Incoming sub-directory.
drwxrwxr-x 3 adouglas wheel 512 Dec 23 09:06 files
Here's where the share in samba starts /usr/files/storage.
drwxr--r-x 7 adouglas wheel 512 Dec 23 09:07 storage
Contains of Storage
drwxr--r-x 7 adouglas wheel 512 Dec 23 09:07 .
drwxrwxr-x 3 adouglas wheel 512 Dec 23 09:06 ..
drwxr--r-x 2 adouglas wheel 512 Aug 7 11:32 AreaCodes DB
drwxr--r-x 16 adouglas wheel 3072 Oct 9 08:24 Documents
drwxrwxrwx 2 adouglas wheel 512 Dec 23 09:08 Incoming
drwxr--r-x 6 adouglas wheel 512 Sep 16 13:05 Software
drwxr--r-x 4 adouglas wheel 512 Aug 19 11:56 VenmarSelect
Do you have any more ideas on how to resolve my two issues?
Here's my entire smb.conf (the names have been changed to protect the innocent... um... er... network):
[global]
workgroup = SOME_WORKGROUP
server string = Dave's Samba Server
netbios name = somename
hosts allow = XX.XXX.XXX.XXX XX.XXX.XXX.XXX
security = share
smb passwd file = /etc/samba/smbpasswd
[Dave]
guest ok = yes
guest only = yes
guest account = ftp
path = /home/dave/Dave's Shared Files
writeable = yes
[root]
guest ok = yes
guest only = yes
guest account = ftp
path = /Root's Shared Files
writeable = yes
In the Global section, "security = share" should open the door for you but it may not be acceptable in your environment. It's the only way I was able to establish a connection without a password.
Using chmod as I suggested works fine for me so I suspect that "guest account = nobody" is the culprit. The default in smb.conf is "guest account = ftp" and since I know nothing about setting up user accounts... It works for me!
Just a reminder (I suspect you already know but...), you MUST restart the Samba server after each change to smb.conf to force it to read and begin using the new file.
See "To require or disable a logon password in a workgroup setting" in the W2K help file for more info. The problem may not be with your share at all or there may be problems at both ends.
I've also looked into the stuff you mentioned in the previous reply and I have gain some improvement but it still prompts for a username/password. I'm at a lose here. Maybe I should try posting some messages in the Unix mailing lists to see if there is bigger audience of Unix users or maybe I should say interesting in helping me out :).
Thanks for your help, I appreciated it. If you happen to think of anything else let me know!
But I think the real answer is that Samba can network so many OSs.
OpenBSD with a public Samba share accessible to Windows, Mac OS and other Unix machinesWhen correctly setup, it's pretty easy to use and fairly transparent to users.
I wouldn't recommend using FTP at all... maybe SFTP at the least.
Go check out Samba at [samba.org...]
I found some other good docs on samba.org but didn't resolve my issue. They always seem to have information about people having the issue of asking for the username and password when your using domain authentication but not user authentication... odd.