I have the following smb.conf file. Note the "guestaccount"
parameter, and
the guest parameters in shareA, shareB, and shareC.
#
# Generated by modify_samba_config.pl
#
[global]
adminusers = Administrator, root
logonhome = \\%L\%U\.9xprofile
addsharecommand
/usr/local/autobench/sources/samba/util/modify_samba_config.pl
addgroupscript = /usr/sbin/groupadd -p "%g"
deletesharecommand
/usr/local/autobench/sources/samba/util/modify_samba_config.pl
include = /etc/samba/dhcp.conf
deleteuserfromgroupscript = /usr/sbin/groupmod -x "%u"
"%g"
adduserscript = /usr/sbin/useradd -m "%u"
deleteprintercommand
/usr/local/autobench/sources/samba/util/modify_samba_config.pl
maptoguest = Bad User
addprintercommand
/usr/local/autobench/sources/samba/util/modify_samba_config.pl
setprimarygroupscript = /usr/sbin/usermod -g "%g"
"%u"
addmachinescript = /usr/sbin/useradd "%u"
domainlogons = yes
deleteuserscript = /usr/sbin/userdel -r "%u"
printcapname = cups
passdbbackend = tdbsam
guestaccount = testguest
printing = cups
cupsoptions = raw
logondrive = P:
addusertogroupscript = /usr/sbin/groupmod -m "%u"
"%g"
logonpath = \\%L\profiles\.msprofile
printcapcachetime = 750
workgroup = SAMBA_TEST
security = user
domainmaster = yes
## Section - [users]
[users]
readonly = No
comment = All users
vetofiles = /aquota.user/groups/shares/
inheritacls = Yes
path = /home
## Section - [homes]
[homes]
readonly = No
browseable = No
comment = Home Directories
inheritacls = Yes
validusers = %S
## Section - [printers]
[printers]
createmask = 0600
browseable = No
comment = All Printers
printable = Yes
path = /var/tmp
## Section - [shareC]
[shareC]
write list = testguest
guest only = yes
guest ok = yes
path = /tmp/shareC
## Section - [print$]
[print$]
directorymask = 0775
createmask = 0664
comment = Printer Drivers
forcegroup = ntadmin
path = /var/lib/samba/drivers
writelist = @ntadmin root
## Section - [shareA]
[shareA]
path = /tmp/shareA
writelist = user1
## Section - [groups]
[groups]
readonly = No
comment = All groups
inheritacls = Yes
path = /home/groups
## Section - [profiles]
[profiles]
directorymask = 0700
createmask = 0600
readonly = No
storedosattributes = Yes
comment = Network Profiles Service
path = %H
## Section - [shareB]
[shareB]
path = /tmp/shareB
guestok = yes
writelist = user1
#
# end of generated smb.conf
#
After reading the smb.conf man page, here's what I think should happen with
the shares. Using smbclient get and put:
user1 should be able to read/write shareA
testguest should not be able to read/write shareA
user1 should be able to read but not write shareB (is authenticated
as testguest)
testguest should be able to read but not write shareB (no password
needed)
user1 should not be able to read/write shareC (is not allowed to
connect)
testguest should be able to read/write shareC (no password needed)
Mounting the shares should produce similar results with file opens.
However, here's what actually happens:
user1 can read but not write shareA (different from above)
testguest can neither read nor write shareA (ok)
user1 can read but not write shareB (ok)
testguest can read but not write shareB (ok)
user1 can read but not write shareC (different from above)
testguest can read but not write shareC (different from above)
Have I misinterpreted the man page?
Sincerely, Don Watson
Linux Technology and Solutions; Beaverton, OR
503-578-4861/TL: 775-4861; dwatson@us.ibm.com