Adding %g and %G subtitution to "force user" and "force group" parameters.
Robbert Kouprie
robbert at radium.jvb.tudelft.nl
Wed Oct 31 13:38:15 GMT 2001
Hi all,
I am using this share definition, which is working perfectly in 2.0.x:
[Floor]
comment = Floor folder for %G
path = /mhome/%G/floor
force user = %G
force group = %G
browsable = yes
guest ok = no
create mask = 0600
directory mask = 0700
read only = no
writable = yes
But in 2.2.2, when connecting with "smbclient //localhost/floor -U
robbert", I get the following errors in my logs:
[2001/10/31 22:11:35, 1, pid=16783, effective(0, 0), real(0, 0)]
smbd/service.c:make_connection(417)
Couldn't find user %g
[2001/10/31 22:11:35, 1, pid=16783, effective(0, 0), real(0, 0)]
smbd/service.c:make_connection(467)
Couldn't find group %G
[2001/10/31 22:11:35, 0, pid=16783, effective(1000, 1041), real(0, 0)]
smbd/service.c:make_connection(565)
robbert (x.x.x.x) Can't change directory to /mhome/app-12/floor
(Permission denied)
In the "force user" and "force group" the %g and %G parameters are not
substituted. This is why the user and group cannot be found. (Obviously
no user or group named "%g" or "%G" exists). The "path = " statement IS
substituted correctly, according to the error message, but because user
and group are not forced correctly, permission is denied to the share.
In smbd/service.c, line 405:
(...)
/* Allow %S to be used by force user. */
pstring_sub(fuser,"%S",service);
(...)
and line 446:
(...)
/* default service may be a group name */
pstring_sub(gname,"%S",service);
(...)
Only %S is substituted. Can %g and %G be added also to make this work
again?
Regards,
- Robbert Kouprie, Linux Systems Admin, The Netherlands
More information about the samba-technical
mailing list