Moin,
do you only have to create the directories or the users too? If you have a e. g. passwd file, you can use a loop like this:
Code:
getent passwd | cut -f1 -d: | while read user; do
test -d /home/$user && continue
mkdir /home/$user && chown $user:users /home/$user
done
It's only a sample - you have to check your system's prerequisites. Especially look for this:
- the home base directory
- the users, which are students (grep for a range of user id's)?
- need to copy /etc/skel into the user directories?
HTH
Jan