collection of bash scripts to manage ldap users and groups
|
|
2 éve | |
|---|---|---|
| .env.example | 2 éve | |
| .gitignore | 2 éve | |
| README.md | 2 éve | |
| addtogroups | 2 éve | |
| creategroup | 2 éve | |
| createperson | 2 éve | |
| funcs | 2 éve | |
| person2posix | 2 éve | |
| removefromgroups | 2 éve | |
| removeperson | 2 éve |
Copy the configuration file :
cp .env.example .env
Then, edit .env and set the correct values
This script doesn't take any arguments. Instead, it will ask you to enter the necessary info. It also asks you if the user should be a posixAccount and for any groups you want to add them to.
Removes a user from the directory, including the corresponding posixGroup if the user is a posixAccount.
./removeperson uid
Since adding the first user needs to be done at the creation of the group, a valid uid needs to be passed to the script.
The optional -p flag must be passed as the first argument. It indicates that the group to be created is a posixGroup. Therefore, the first user also need to be a posixAccount.
./creategroup [-p] uid group
Adds a user to one or more groups. User's uid must be the first argument. Posix and non-posix groups can be given, but if posixGroups are given, the user need to be a posixAccount.
./addtogroups uid group1 [group2, group3, ...]
./removefromgroups uid group1 [group2, group3, ...]
Converts an inetOrgPerson account to a posixAccount.
./person2posix uid