https://github.com/thechymera/mkusers
Automatically Create a Large Amount of Users on a Linux System.
https://github.com/thechymera/mkusers
gentoo linux operating-system permission-manager system-administration teaching user-management
Last synced: 7 months ago
JSON representation
Automatically Create a Large Amount of Users on a Linux System.
- Host: GitHub
- URL: https://github.com/thechymera/mkusers
- Owner: TheChymera
- License: gpl-3.0
- Created: 2017-09-12T13:25:19.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-14T17:16:59.000Z (over 8 years ago)
- Last Synced: 2025-06-01T10:01:01.107Z (10 months ago)
- Topics: gentoo, linux, operating-system, permission-manager, system-administration, teaching, user-management
- Language: Shell
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mkusers
A simple bash script which allows you to create batches of users in one go, and populate their home directories with specific files.
This is useful for teaching and demonstration purposes.
For obvious purposes this script needs to be run as root.
## Installation
### [Gentoo Linux](http://en.wikipedia.org/wiki/Gentoo_linux) and [Derivatives](http://en.wikipedia.org/wiki/Category:Gentoo_Linux_derivatives)
The mkusers script is available via [Portage](http://en.wikipedia.org/wiki/Portage_(software)) as **app-misc/mkusers** (from the [Chymeric Overlay](https://github.com/TheChymera/chymeric)).
Just run the following command:
```
emerge app-misc/mkusers
```
*If you are not yet using the Chymeric Overlay, it can be enabled with just two commands, as seen in [its README](https://github.com/TheChymera/chymeric).*
### Manual Installation (on any Operating System)
Either clone as user, and navigate to the directory to execute the file as root, or clone directly as root.
```
git clone https://github.com/TheChymera/mkusers.git
```
The script can be executed in place:
```
cd /path/to/your-script-containing-directory
./mkusers.sh
```
## Examples
If you have chosen the manual installation option above, you will have to use the executable path instead of just the script name in the following examples (i.e. `./mkusers.sh` instead of `mkusers`).
### Create Users
Create 9 users named `user01` through `user09`, set user-specific passwords (e.g. `EXCITE17user01` for `user01`), and place the `neurodata` directory found at `/home/someotheruser/neurodata` in each of their home paths.
```
./mkusers.sh "-Uuser"{01..09} -q -p EXCITE17 -c /home/someotheruser/neurodata
```
### Remove Users
Remove users "user01" through "user09", including their home directories and mail spools.
```
./mkusers.sh "-Uuser"{01..09} -q -R
```