docker-scripts-archived / dev--LTSP

Virtual LTSP server with vagrant and/or docker-scripts.
GNU General Public License v3.0
7 stars 6 forks source link

Add support for managing bulk user accounts #79

Closed dashohoxha closed 6 years ago

dashohoxha commented 6 years ago

Create a script called accounts.sh which can help to manage user accounts in bulk (big quantities). For example it can be used like this:

./accounts.sh import user-accounts.txt
./accounts.sh export > user-accounts.txt
./accounts.sh backup
./accounts.sh restore user-accounts-20180607.tgz

etc.

The file user-accounts.txt can be a CSV file, or something like this: https://github.com/docker-scripts/shellinabox/blob/master/accounts.txt

d78ui98 commented 6 years ago

I have created a basic script that reads username and password from user-accounts.txt. And creates the users. I can add import, export backup functionality by using case. However I am not sure what should happen what should happen in each case. So can you please elaborate a little bit.

dashohoxha commented 6 years ago

What you have done is import. The reverse process is export (from the existing user accounts you create a text file that can be imported later, or to another server).

Backup is like export, but also saves a copy of the home directory of all the users. Restore is the reverse process (from a backup archive, recreate the user accounts and their home dirs).

The task is open. Think about it. What needs to be done to manage easily about 200 user accounts? It is not possible to manage them manually one by one. If you have tried ltsp-manager, maybe you have noticed that it has some features for bulk user management (for example using CSV files, etc.) Maybe you can get some ideas from it.

d78ui98 commented 6 years ago

The reverse process is export (from the existing user accounts you create a text file that can be imported later, or to another server).

I can get the username from /etc/passwd. But I am not sure how will I get the password as it is encrypted.

dashohoxha commented 6 years ago

I am not sure either. Maybe you should keep it as encrypted.