Re: Adding LTSP thin users from a text file

Joseph Bishay <[email protected]> Fri, 9 Aug 2019 12:58:14 -0400
Newsgroups gmane.linux.terminal-server.general
Message-ID <CAAQsohBGv9kUzvPQ3jd6wO2-j859Gr9mUGSyn98s61rPsayxCA@mail.gmail.com>
Hello,

For our students I've come up with the following system:

a)  Install Webmin from http://www.webmin.com/

b) Webmin has browser-based interface to allow you to batch create users
either a CSV upload or direct text paste into the window.  Details are here:
https://doxfer.webmin.com/Webmin/Users_and_Groups#Creating_users_from_batch_files

It uses the format:

create:username:passwd:uid:gid:realname:homedir:shell:min:max:warn:inactive:expire

for example:
create:jcameron:mysecret::3001:Jamie Cameron:/home/jcameron:/bin/bash:::::

c) I have a spreadsheet that creates that formatted line automatically.  I
enter into column A the last name, Column B the first name, and Column C
has the password (either randomly generated or I specifically enter it),
and then I have some simple excel text functions to create that line in
column D.
=CONCATENATE("create:",LEFT(B2,1),A2,":",C2,":::",B2,":",A2,":/home/",LEFT(B2,1),A2,":/bin/bash",":::::")

This will take the first letter of their firstname and their last name and
create a username and home directory as flastname and will output:

create:JCameron:p@ssword:::Jamie:Cameron:/home/JCameron:/bin/bash:::::

All I have to do is just put the list of names and randomly-created
passwords (such as from this website: https://www.random.org/strings/ ) and
then the formula will create the users automatically.  It can be modified
easily as needed.

I've done this for many many users and it works great.

I've also used it to move users from one system to another.  Webmin will
export the users with all their information and encrypted/hashed
passwords.  Copy-paste that text file to the new server's webmin and it's
done -- all the users are created on the new system with their old
password, home directory, UID and GID the same as before.

Hopefully this proves useful!

Joseph

On Thu, Aug 8, 2019 at 6:02 PM Tichaona Zvidzayi <[email protected]> wrote:

> Hi All,
>
> What is the best way to add new users e.g. for a school with say 500 users
> without having to manually add each individual user?
>
> Regards
>
> Tichaona Zvidzayi
>
> _____________________________________________________________________
> Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
>       https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
> For additional LTSP help,   try #ltsp channel on irc.freenode.net
>

_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net