How to link ssh login to the user's share if I created users with "Home directory: /nonexistent"

GabrieleMax

Dabbler
Joined
Mar 25, 2023
Messages
15
Hi guys,

I have a TrueNAS-13.0-U5.3 where I did five SMB shares, one without password and other four with different username and password so now I'd like to enable ssh connection for the three users and I followed this guide https://www.truenas.com/docs/core/coretutorials/services/configuringssh/ so when I log in with one of the "normal user" I have:

Welcome to TrueNAS
Could not chdir to home directory /nonexistent: No such file or directory
NAS01% ls
bin COPYRIGHT etc mnt root usr
boot data lib net sbin var
compat dev libexec proc storcli.log
conf entropy media rescue tmp
NAS01%

I should link the ssh user login to a specific shared folder, I created users with the value "Home directory: /nonexistent", I have Pool01, inside of it I have Dataset01, and here I have four shares named user01, user02, like this /mnt/Pool01/Dataset01/User01 obviously these four users have different passwords to gain access to their specific folders by the SMB share which works well.

For security reasons I don't need or I think it's not a good idea to create users with "home users" feature but now I should try to redirect the login for every users to their specific folder, how can I do it?

Regards
GabrieleMax
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222

GabrieleMax

Dabbler
Joined
Mar 25, 2023
Messages
15
What are you trying to achieve? Why would your SMB share users need SSH?
I need to copy, from a linux machine with Debian Bookworm, some folders to a smb share on the nas and I'd like to do it just for one time.

I thought a quick solution, I could mount from root on the nas the remote Debian folder and after it I could use a simple cp.

In the future I could enable a share on the nas just for unix like machine and I will study if I'll need to enable the home directory or if there's another way to enable scp the feature which I use from unix like clients to the nas.

Regards.
GabrieleMax
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
Top