I have a large number of users (100s) that I want to make accounts for on my machine. I'm trying to find the fastest way to automate their addition, including setting passwords for them. I have a default password list I want to use (yes, I know this isn't the best security in the world
). I've tried writing a small bash script to automate this but to no avail. I've also used the following commands:
newusers - the problem with this is that it doesn't copy the contents of /etc/skel (I also don't remember if it creates the home directories or not)
useradd - I tried it with the -p option but that should take it as encrypted + it doesn't even create the home directories for you.
I've heard that Expect is good at doing this sort of thing. Any ideas? Thanks for your time.