I add users to my server with the command
useradd -m -p PASS_HASH -s /usr/sbin/nologin USERNAME
Then I try to access their samba home share, but it never shows up until I login with the user:
root:~$sudo login failtest Password:###### Added user failtest.
Is there some way of added the user without logging in?
Edit: The problem is that the user is added with the useradd command, but ubuntu seems to run an initalisation script when the user logs on for the first time. This script then adds that user to the tdbsam user database. Finding the initalisation script or the method it uses to add a user to the tdbsam database without requiring any user input (as smbpasswd -a USER prompts the user for a password).
So all I need is a way to add a user+pass to the tdbsam database without prompting a user for a password (eg: samaba-add-user.sh USERNAME PASSWORD).