Skip to content

m0zgen/user-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

User Management

This script is a simple tool for user management in Linux distros.

Functionality

  • Create users
  • List all created users
  • Lock / Unclock users
  • List all locked users
  • Backup user home
  • Generate SSH key for exist user
  • Promote user to admin
  • Degrate user from admin
  • Delete user
  • Logging all actions in actions.log

Backups

Script create backups catalog in the script folder and them create tar.gz archive with name which contains - user name and current date

SSH keys

Script generate 4096 RSA key for target user in /home/<user>/.ssh and key has name is id_rsa_<username>.

After SSH key was generate, script show the contents from id_rsa_<username>.pub file to the admin.

Promoting / Degrating

  • Promoting - User will add to wheel group and them will create file in /etc/sudoers.d/<user>
  • Degrating - User will remove from wheel group and file /etc/sudoers.d/<user> will be remove

Logging

Script has action.log with logged basic actions with:

  • Date and Time
  • User name
  • Action

About

⚙ Linux script for user management

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages