4
votes
2answers
1k views

Proper way to add a user account via bash script

I cross posted this question to AskUbuntu because my problem seems most acute on Debian/Ubuntu, but it was suggested that I ask here. Whatever method is suggested for solving this problem should work ...
2
votes
2answers
3k views

How to add a unix/linux user in a bash script

Here's my test bash script. I'm not able to get it to work. I'm seeing two errors: Use of uninitialized value $answer in chop at /usr/sbin/adduser line 589. Use of uninitialized value $answer in ...
3
votes
2answers
663 views

Bash is not fully functional for a new user

I just created a new user on my system using useradd -d /home/users/john -m john (Using Ubuntu 11.04). This worked fine, but when I changed to john, my bash is not fully functional. That is, it has no ...
5
votes
3answers
787 views

How should I add users non-interactively?

I have a set of users I need to add to a new system as part of a BASH script that preps my server. How can I non-interactively add the user, create their home directory, set the group, and enter a ...