net 5212 3561 0 /usr/bin/net usershare add -l Public /home/andreas/Public Everyone:R,andreas:F guest_ok=y
or this, without guest access:
net 5779 3561 0 /usr/bin/net usershare add -l Public /home/andreas/Public Everyone:R,andreas:F guest_ok=n
The default path for "usershare path" is /var/lib/samba/usershares, and it seems to be setup correctly:
drwxrwx--T 2 root sambashare 4,0K abr 4 09:46 /var/lib/samba/usershares/
For this version of samba at least, that command line won't work. There also seems to be a bug in the processing.
This works:
root@nsn7:~# net usershare add --long Public /home/andreas/Public somecomment Everyone:R,andreas:F guest_ok=y
[Public]
path=/home/andreas/Public
comment=somecomment
usershare_acl=Everyone:R,Unix User\andreas:F,
guest_ok=y
The short form of --long, -l, does not:
root@nsn7:~# net usershare add -l Public /home/andreas/Public somecomment Everyone:R,andreas:F guest_ok=y
[2022/04/04 10:00:33, 0] ../../lib/util/debug.c:1100(reopen_one_log)
reopen_one_log: Unable to open new log file 'Public/log.net': No such file or directory
net usershare add: share name /home/andreas/public contains invalid characters (any of %<>*?|/\+=;:",)
Also, the command issued by gnome seems to be missing the comment, notice how I added "somecomment" above.
execsnoop tells me this is the command being run:
net 5212 3561 0 /usr/bin/net usershare add -l Public /home/andreas/ Public Everyone: R,andreas: F guest_ok=y
or this, without guest access:
net 5779 3561 0 /usr/bin/net usershare add -l Public /home/andreas/ Public Everyone: R,andreas: F guest_ok=n
The default path for "usershare path" is /var/lib/ samba/usershare s, and it seems to be setup correctly: samba/usershare s/
drwxrwx--T 2 root sambashare 4,0K abr 4 09:46 /var/lib/
For this version of samba at least, that command line won't work. There also seems to be a bug in the processing.
This works: Public somecomment Everyone: R,andreas: F guest_ok=y andreas/ Public acl=Everyone: R,Unix User\andreas:F,
root@nsn7:~# net usershare add --long Public /home/andreas/
[Public]
path=/home/
comment=somecomment
usershare_
guest_ok=y
The short form of --long, -l, does not: Public somecomment Everyone: R,andreas: F guest_ok=y util/debug. c:1100( reopen_ one_log) public contains invalid characters (any of %<>*?|/\+=;:",)
root@nsn7:~# net usershare add -l Public /home/andreas/
[2022/04/04 10:00:33, 0] ../../lib/
reopen_one_log: Unable to open new log file 'Public/log.net': No such file or directory
net usershare add: share name /home/andreas/
Also, the command issued by gnome seems to be missing the comment, notice how I added "somecomment" above.