0

Lets say i have a file called users.txt with the following user info:

user1:6001:grp1:This is user1:/home/user1:/bin/bash
user2:6002:grp2:This is user2:/home/user2:/bin/dash
user3:6003:grp3:This is user3:/home/user3:/bin/fish

I want a bash script that can add all these users automatically. With the correct username, UID, group, name, home folder and shell..

Any advice how to do this? i am stuck..

Kusa
  • 1
  • In such cases, always use the manual: `man adduser` should help you a lot. Afterwards, it will be a question of programming in bash to read the file and repeatedly use the command. – Marc Vanhoomissen Feb 06 '18 at 11:08
  • This is essentially a duplicate (with a different delimiter) of [Import users from CSV file](https://askubuntu.com/questions/633695/import-users-from-csv-file) – steeldriver Feb 06 '18 at 13:05

0 Answers0