Skip to content

xtasysensei/create-users-bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

create-users

Because you are too lazy to do it manually

A shell script which create users, assign them to groups, and set their passwords automatically.

What it does

  • Reads the users and groups supplied in the .txt file
  • Creates the users and groups from read data
  • Assigns randomly generated password to each user. Passwords are saved in /var/secure/user_passwords.csv
  • Adds users to appropriate groups
  • Creates a $HOME directory for each user with appropriate permission
  • Logs all script actions in /var/log/user_management.log

Running

Script must be run as root(#).

$ git clone https://github.com/xtasysensei/create-users-bash.git
$ cd create-users-bash 

# run as root 
$ bash create_user.sh <name-of-text-file>

Dependencies

  • your favorite POSIX-compliant shell (only tested on bash)

OS

Works in any GNU/Linux environment

Caution

This script will modify current System configurations. Only use after thorough verification. The Author is not liable for any damages caused by this script.

About

A shell script which create users, assign them to groups, and set their passwords automatically.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages