I have to create multiple users in an Ubuntu environment from a csv file that lists their names and password. I am using the following tutorial
But I am not been able to run newsusers command successfully. I get the following ERROR message
newusers: group 'tom' is a shadow group, but does not exist in /etc/group
newusers: line 1: can't create group
newusers: error detected, changes ignored
Here is the format of my csv file
tom:password1::::/home/tom:
danny:password2::::/home/danny:
Also note that i have a csv file not : delimited file. I am also wondering how to communicate the password to multiple users if they are more than 100.
The output from running sudo grpck -r is
$sudo grpck -r
no matching group file entry in /etc/group
delete line 'tom:*::'? No
grpck: no changes
Please note that if i don't specify home directory like /home/tom in the csv file, it is NOT created. Is there a way to create it by default?
Thanks
After deleting Tom per @steeldriver's suggestion, when i run the newusers command, i get the following
$ sudo newusers < test.txt
[sudo] password for oper:
newusers: (user tom) pam_chauthtok() failed, error:
Authentication token manipulation error
newusers: (line 1, user tom) password not changed
newusers: (user danny) pam_chauthtok() failed, error:
Authentication token manipulation error
newusers: (line 2, user danny) password not changed