Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

samba activity as nobody despite guest account setting

Tags:

samba

I'm setting up samba on linux for single user access from Windows, and need to prevent password checking. I've added my linux username to smbpasswd. Despite the guest account setting in my smb.conf, files I create are owned by user nobody. How do I get samba to operate as my user id?

smb.conf:

[global]
security = share
guest account = liam
...

[goodstuff]
path = /home/liam
read only = no
guest only = yes
guest ok = yes

If this is a FAQ, apologies; I looked and looked for the answer.

like image 385
Liam Avatar asked Nov 06 '22 08:11

Liam


1 Answers

This seems to be a common problem, for me it currently does NOT work if I have it in the share's section, but it works if it is in the global section. This is my share's definition:

[RepoDrive]
    comment = USB drive
    path = /shr
    read only = No
    create mask = 0777
    directory mask = 0777
    guest only = Yes
    guest ok = Yes
    browseable = No

According to the Samba manual, specifying guest account for the share SHOULD be okay and this is how it SHOULD be done... IMO, Samba has a LOT of issues. Note that if you want to find out as which user you are acting when you are a guest, make sure you have write permissions and create a folder, then you can check out the folder's owner, and this will be the user that samba used. For me, it is "nobody" (the default) if I specify the guest account in the share section.

Note that smbpasswd has nothing to do with these user definitions.

If all else fails, try to use testparm (you need sudo apt-get install samba-common-bin in order to get it). It will show you which parameters of your configuration are actually effective, and detect any irrelevant/incorrect parameters (it eliminates settings that you set to the default value, and rewrites synonyms, e.g. writeable = yes will become read only = no because these are antonyms).

like image 85
Firefall Avatar answered Dec 07 '22 18:12

Firefall