samba and webmin

2010-12-17 13:50:10 GMT
Hello

i am tring to setup SAMBA with webmin. the problem im having is that i can not login to the shared areas like homes and users.
i can see them when i search my network i double click on them and it asks for user name and password. i have already set up a user using the convert unix user to samba user and have set a password. i have set teh Use encrypted passwords? to yes. when i try and log in it say login unsuccesful login or password my be incorect.

does anyone know why? and does anyone know of a guide of setting up SAMBA with webmin? Samba Configuration: i fould this one but didnt help. in uesing suse 11.3 and windows vista

thanks for any help

I don’t know of a guide for webmin/samba. But we can look into the problem if you run these commands and post the returns back here:

  • cat /etc/samba/smb.conf
  • sudo pdbedit -L
  • ls -l /home

Also, I understand that the problem is accessing openSUSE shares from vista. But what about accessing openSUSE shares from openSUSE, is that OK or does the password problem occur there too?

ok this is the the out put from running •cat /etc/samba/smb.conf

smb.conf is the main Samba configuration file. You find a full commented

version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the

samba-doc package is installed.

Date: 2010-07-05

[global]
include = /etc/samba/dhcp.conf
logon drive = P:
map to guest = Bad User
encrypt passwords = yes
logon home = \%L%U.9xprofile
passdb backend = tdbsam
printcap cache time = 750
cups options = raw
printing = cups
logon path = \%L\profiles.msprofile
workgroup = WORKGROUP
os level = 20
printcap name = cups
security = share
usershare allow guests = Yes
[homes]
comment = Home Directories
writeable = yes
valid users = %S,%D%w%S
inherit acls = Yes
[profiles]
comment = Network Profiles Service
path = %H
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700
[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/
[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775

sudo pdbedit -L
nobody:65534:nobody
willem:1000:willem beacham
ls -l /home

total 20
drwx------ 2 root root 16384 Dec 16 23:42 lost+found
drwxr-xr-x 26 willem users 4096 Dec 17 11:26 willem

This share:

[homes]
comment = Home Directories
writeable = yes
valid users = %S,%D%w%S
inherit acls = Yes

is accessible from windows on the address \opensusename\willem. You might not see it in the network browser of windows (can’t quite remember) so type the address in full. Once you’ve logged in it might show later. Substitute the openSUSE machine’s netbios name for “opensusename”. The name you want is what you see for the computer in the windows browser.

This share:

[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/

is the directory /home but that belongs to user=root, group=root, so you’ll probably never log onto it, just get rejected. You should either (a) edit smb.conf and delete the code for it or (b) make it accessible by altering the stanza in smb.conf for [users] and/or the permissions on /home (bad idea).

This share:

[profiles]
comment = Network Profiles Service
path = %H
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700

is meant for use with domains but you have a workgroup (called “WORKGROUP” according to the code that I see) so you should delete the stanza for [profiles] from smb.conf.

This share:

[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes
[printers]

is broadcasting a directory (/home/groups) that doesn’t exist (unless you made it yourself) so you should delete it from smb.conf.

The Samba config file smb.conf has some [global] definitions in it that are a bit wonky. I recommend that you replace the [global] stanza with this version:

[global]
workgroup = WORKGROUP
netbios name = name_of_this_workstation
passdb backend = tdbsam
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
usershare owner only = False

replace “name_of_this_workstation” with some appropriate netbios name for the openSUSE server (what you’d like to see in the windows browser).

I don’t know how to edit the smb.conf file in webmin. I only know the easy way with a text editor (a bit like using wordpad in windows). If you want to do it the easy way, these commands will open smb.conf for you:

  • KDE users use this: kdesu kwrite /etc/samba/smb.conf
  • Gnome users use this: gnomesu gedit /etc/samba/smb.conf

You’d need a reboot or two after these alterations if you choose to make them.

FFI here is a primer for Samba: Samba and Suse: HowTo Set up an openSUSE-Windows Home Office LAN/Network. Versions 11.x

Thanks very much i will give it ago and see if it works.