Hi Community, I am new to the Truenas community. The other day, I installed the Truenas scale for the first time. I configured LDAP (freeIPA) with Truenas. However, when I try to log in from the UI using an LDAP user, I can’t. I get a user/password error. However, I am able to SSH using the same user via CLI. However, it didn’t SSH using a password, so I copied the authorization key using the admin user.
Second, I tried to create a local user and found out the default home directory is/var/empty, which I can’t change. I can create a local user, but it sets the user’s home directory to/var/empty. I changed the directory using the command line, but when Truenas restarts, it reverts the change.
How can I log in to GUI using LDAP users and change the local user’s home directory?
I appreciate your help!
Issue 1 LDAP login:
What groups are the LDAP users member of? To access the WebUI they would need specific permissions assigning.
Issue 2 Local user home directory:
Did you select the checkbox to create home directory when you created the user?
See the tutorial:
UI / API authentication with LDAP and AD users is an enterprise-licensed feature.
Yes, I checked box “Create Home Directory.” I am not sure why it’s still not letting me create a user with a home directory.
Because nothing in your system is mounted at /home
. As the error message is telling you, the home directory must be somewhere inside /mnt/
(which is where all your data is mounted), or else /var/empty
. It cannot be /home/anything
, because /home
doesn’t (usefully) exist[1].
Yes, it exists, but it’s part of your boot device and can’t be used for user data. ↩︎
I have no idea why you think that’s relevant. As I said, and as the error message on the screen that you’ve posted at least twice is telling you, user home directories can’t be in /home
. You’ll need to choose a different path.
My apology, I misread your message. I try to use /mnt to create home directory it’s still not letting me create user with a home directory.
…and what is the error message telling you?
To give more specific information. Typically, I create a dataset (for instance storage/homes) and create the user home directory in that path. E.g. /mnt/storage/homes/wilbur
.
If you click that carrot next to the /mnt folder, you can just browse and select an existing location where you want the new home directory created (which will automatically give you a valid path)
I was able to create by choosing pool under /mnt. I didn’t have an idea user home directory will be separate from the actual /home. Thank you!
I was able to create a home directory by selecting /mnt/pool. I was under the impression that the user’s home directory is part of the actual /home. Thank you.
Home directories can be an arbitrary filesystem path in unix-like systems (though we restrict paths to data pools). That said, in most cases you can leave it on default of /var/empty (most local users don’t need actual shell access to NAS).
The only reason I needed a home for the user was that/var/empty was not letting me save the SSH key. From another server, I tried to copy the SSH key, but I kept getting an error like the.ssh directory is not allowed to be created. The goal is to use another user instead of the admin user. I was treating it like any other Unix system in which users’ home directories are under /home. Now I understand. I appreciate your help!