4 ms·
I once had to connect to machines regularly where I did not have a home directory. This happened so often that I wrote a wrapper to log in: It would log into
by hibbelig 6y ago
I once had to connect to machines regularly where I did not have a home directory. This happened so often that I wrote a wrapper to log in:
It would log into the remote machine using Expect, then it would send a command to the remote end that tested whether a home directory already existed. If so, it spawned a new shell in it. Otherwise it created a "home directory" in /tmp, pulled a tarball from a server, and extracted it into the "home directory". Then it spawned a new shell there.
Depending on how often it happens, you could also have a separate command that does the initial setup, and then call that as required.