I recently used the newusers command to generate several user accounts from a text file. That process seemed to go well until I tried to su into one of the new accounts.
su - newaccount
I was greated with the following:
I typed "pwd" to see if I was in the home directory and indeed I was.
This behavior appears for all the accounts that were created from the text file and the newusers command. It seems that several configuration files that should have been autogenerated for these new users were never created. I was able to confirm this was the problem by copying .bashrc and .bash_profile from a user that was created with the "useradd" command into the /home/newaccount directory. After logging off and logging into the newaccount again, the issue is corrected. I am greeted with the following:
Some recent google searching has guided me to the /etc/skel directory. Apparently when using the useradd command with the -m option files in the /etc/skel directory are copied to the new users home directory automatically.
Is there any equivalent for the "newusers" command?
Thanks in advance.
For the record, I just read this forum post and I'm looking for an alternative to this. If this is the most efficient way to accomplish my goal, then I'll try the route mentioned in the thread. I'm still open to alternatives.