Samba wants username and password, none have been established. SuSE 11.3

I am attempting a simple two computer office network using Samba. When attempting to access the shared director, a screen pops in Linux and Windows requesting a user name and password. I haven’t established a user name or password. Is there a way to allow any computer on the network to access the shared file without a user name and password? Thank you in advance.

The following is the result of:
cat /etc/samba/smb.conf

[global]
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = No
domain master = No
security = user
workgroup = PMG

[Patient Records]
comment =
inherit acls = Yes
path = /home/physmed
read only = No

Share disabled by YaST

[netlogon]

comment = Network Logon Service

path = /var/lib/samba/netlogon

write list = root

[printers]
comment =
path = /var/tmp
printable = Yes

Is physmed a Linux user with home directories at /home/physmed? If the answer is “no”, who owns the directory physmed? Also is the directory physmed a single directory containing files or a directory tree?

The way to share the files in physmed varies according to your answer/s.

Thanks for the help Swerdna. (Is Swerdna an play on AnderwS?)

Your question pointed me into the right direction. I hadn’t set up file sharing. However, the file sharing has not gone as expected.

I do have a user account physmed, and I want to share a director in its home directory. I set up the simple share to all users, and tested Samba. It was still looking for a user name and password. I put in the user name and password for the physmed account, and it didn’t work. I also tried root and the main password, no luck.

Out of frustration, I copied the folder I want to share into /root. I modified samba to share these files. I also set it up to not require a password. However, using Samba, a password screen popped up, and it worked for the root account user name and password.

I have a working solution, however its not one I like. I really don’t want my root account password sitting on my wife’s window’s notebook.

Is there some way to clear out the Samba, file share passwords? It seems like there is some conf file that somehow got set with a user name and password and it’s not being reset with file share.

Thanks for the help.

You may find this article useful.

You may be find interesting using NFS instead of Samba. I Couldn’t find any good article in english but I hope you will.

Pancho

Suppose you want to share the directory /home/physmed/abcde (adjust what follows for the correct path and name).

The folder abcde is owned by physmed with permissions drwxr-xr-x i.e. stock standard normal.

The stanza in smb.conf for the share is then:

[Patient Records]
path = /home/physmed/abcde
read only = No
guest ok = yes
force user = physmed

Make the [global] stanza to be this:

[global]
workgroup = PMG
netbios name = name_of_this_workstation
name resolve order = bcast host lmhosts wins
server string = ""
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
use client driver = yes
map to guest = Bad User
local master = yes
preferred master = yes
os level = 65
usershare allow guests = Yes
usershare max shares = 100

Instead of name_of_this_workstation put a name you might like, to sit beside the icon your wife will see in her network browser naming your computer.

Try that, reboot the windows box, then pause 3 minutes, then reboot the Suse box, then pause 3 minutes, then reboot windows, then pause, then look.

What happens?

Thanks for the help Swernda.
The network is now sharing. However, Linux and Windows still require user name = root, and root’s password to access the directory, even though the directory has simple share enabled.

Please post here the contents of smb.conf.
Also please run the command “ls -l” in the directory that contains the shared directory. [e.g. if the shared directory is abcde located at /something/xyz123/abcde, run the command “ls -l /something/xyz123”]

Just for the protection of others, the article you reference is seriously flawed. There is a copy posted in our forums. I have discussed it with the author and the author has undertaken to revise it. I recommend that readers do not use it in its present state.

Thanks Swernda

Contents of smb.conf

[global]
workgroup = PMG
netbios = linux-15i2
name resolve order = bcast host lmhosts wins
server string = “”
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
use client driver = yes
map to guest = Bad user
local master = yes
preferred master = yes
os level = 65
usershare allow guests = Yes
usershare max shares = 100

[Printer]
path = /var/tmp
printable = Yes

[Records]
comment = Patient Records
inherit acls = Yes
path = /home/physmed/xyz
read only = No


The ls -l command shows potentially confidential data, so I can’t display it.
I think this is were the problem is located. The files and directories do not have the same ownership. I will update the ownership to the /home/physmed owner and post the results.
Thanks again.

The problem is in the ownership but aso in the form of the stanza for the share, which should be changed to this form:

[Records]
comment = Patient Records
path = /home/physmed/xyz
read only = No
guest ok = yes
force user = physmed

Make a copy of the folder xyz and all the contents, a backup just to be safe, and then run this command to change the owner of the folder and all its contents:

sudo chown -R physmed:users /home/physmed/xyz

Were are definitely moving in the right direction.
The network functions between the desktop Samba server and a net book running SuSE 11.3.
However, now the Windows laptop doesn’t see the PMG workgroup like it did before. I’ve tried cold starting both machines, booting the Samba server, and then the Windows machine.

Here is smb.conf

[global]
workgroup = PMG
netbios = linux-15i2
name resolve order = bcast host lmhosts wins
server string = “”
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
use client driver = yes
map to guest = Bad user
local master = yes
preferred master = yes
os level = 65
usershare allow guests = Yes
usershare max shares = 100

[Printer]
path = /var/tmp
printable = Yes

[Records]
comment = Patient Records
path = /home/physmed/xyz
read only = No
guest ok = Yes
force user = physmed

This is wrong: netbios = linux-15i2

it should be: netbios name = linux-15i2

Thanks for all the help Swerdna. I owe a beer and enormous gratitude.
The smb.conf file as modified worked for exchanging files. Unfortunately, Windows was unable to print to the USB printer attached to the Linux machine. I striped out the printer stanzas from the default smb.conf, and got it working. The working smb.conf is as follows.


[global]
workgroup = WORKGROUP
netbios name = linux-15i2
name resolve order = bcast host lmhosts wins
server string = “”
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
use client driver = yes
map to guest = Bad user
local master = yes
preferred master = yes
os level = 65
usershare allow guests = Yes
usershare max shares = 100

#[Printer]

path = /var/tmp

printable = Yes

[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Driver
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775
[Records]
comment = Patient Records
path = /home/physmed/xyz
read only = No
guest ok = Yes
force user = physmed

I owe a beer and enormous gratitude.

The economical method of shipping from the Pacific Northwest to the Western South Pacific would be to by the container load :wink: