SMB access - Credentials

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
I am trying to keep things as simple as possible, This is a fresh install from only a couple days ago (in sig)

Looking at credentials>local groups, there are none listed, local users, only the root user, both as expected.

I am looking to build an account suitable for use from my primary Windows 10 system, something to map a drive to a samba share and allow me to write/read/delete files, nothing special. This account will not be used locally on TrueNAS, I will create future accounts for apps etc.

I can't think of a reason to have a home directory for this ID. https://www.linux.com/training-tutorials/linux-directory-structure-home-and-root-folders/

The TrueNaS add user screen seems to happily make an ID w/o a Home Directory.
1647647234746.png
1647647254629.png


Question1: Am I wrong? Is there any reason to create / specify a home folder for this type of user account?

Associated Group
I understand that you must assign a primary Group to each User.
I also plan to add access via user (not group) again for simplicity.
I can't think of why I would want to use an existing group for this user's Primary Group, so I suppose the default checked "New Primary Group" is the right choice.

Question2: Am I wrong? I don't yet have a reason to use this new group yet but since I need to have a primary group ... why not ..

If someone can confirm these choices make sense for my stated use case I would appreciate it.
 

CryptoBG

Cadet
Joined
Mar 21, 2022
Messages
1
If you leave it as it is (/noneexistent) it wont create home directory for the new user.

You need to set primary group for new users. If you leave the check on "New Primary Group" it will create new group with the name of the username you set for the new user.

If you dont want to create multiple groups for every users you created, just create one generic group (SMB-Users or something like that). After that create users (uncheck the mark on "New Primary Group" and for primary group select the group you created.)

And when you set the SMB share, you can set the ACL and give access just to that user and not to the group.
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
Thanks for your reply.
I decided that creating a home directory was of no value in this use case, so I left it to /nonexist. So far it seems a good fit and has caused no issue that I have been able to determine. Similarly, I let it create a new primary group for the user. I did use the ID and the group as owners when I made the ACL for the dataset. I thought I could leave root for the owner ID+ owner group, and just add my user ID to the ACL as allow w full control, but that didn't work .. so I am glad I did create the new / id and group.
 
Top