[Pkg-samba-maint] Bug#1076495: Bug#1076495: samba-common-bin: net usershare guest_ok paramter is parsed as a comment
Michael Tokarev
mjt at tls.msk.ru
Wed Jul 17 09:47:47 BST 2024
Control: severity -1 minor
17.07.2024 11:04, debian-reportbug at mx.brindabella.org wrote:
> Package: samba-common-bin
> Version: 2:4.17.12+dfsg-0+deb12u1
> Severity: normal
>
> Dear Maintainer,
>
> On a fresh install of Debian, user enters the following command:
>
> user at debian:~# net usershare add testing /home/user/myusershare/ guest_ok=y
>
> The resulting usershare generated by Samba is as follows:
>
> root at debian:~# cat /var/lib/samba/usershares/testing
> #VERSION 2
> path=/home/user/myusershare/
> comment=guest_ok=y
> usershare_acl=S-1-1-0:R
> guest_ok=n
> sharename=testing
>
> Note that the 'guest_ok=y' parameter has been parsed as a comment not as specifying guest access. This appears inconsistent with the man page for
> net(8), which suggests [comment] and [acl
> ] are *optional* parameters. The usershare is created with what are presumably default values for ACL and guest_ok.
>
> USERSHARE ADD sharename path [comment] [acl] [guest_ok=[y|n]]
>
> The only way to ensure the guest_ok=y parameter is correctly added to the usershare definition is to include both a comment and an ACL - eg:
>
> net usershare add testing /home/user/myusershare mycomment S-1-1-0:f guest_ok=y
>
> This is contrary to the man page which suggests [comment] and [acl] are optional. This requires user to know what to specify for ACL, which would
The net(8) manpage says:
The usershare commands are:
net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.
net usershare delete sharename - to delete a user defined share.
net usershare info [--long] [wildcard sharename] - to print info about a user defined share.
net usershare list [--long] [wildcard sharename] - to list user defined shares.
USERSHARE ADD sharename path [comment] [acl] [guest_ok=[y|n]]
Add or replace a new user defined share, with name "sharename".
....
Note the list of all usershare commands just 4 lines above the line you
quoted.
Either way, please address this upstream.
Thanks,
/mjt
More information about the Pkg-samba-maint
mailing list