-
Notifications
You must be signed in to change notification settings - Fork 0
Usage
Users are stored in a file in the user's name per line format like the following sample-group.txt file has:
tony.iommi
bill.ward
geezer.butler
ozzy.osbourne
Let's consider in following examples of usage of WebsiteUsersEditor that the sample-group.txt file is stored in the usersLists directory.
Group is just a directory that contains home directories of some users. All groups are stored in a directory at apacheServerDocumentRoot/websitesLocation (see Configuration section).
./Create-WebsiteUsers.ps1 < usersLists/sample-group.txt
creates users from the usersLists/sample-group.txt file in the group called 2020 by the Settings.json configuration file.
./Create-WebsiteUsers.ps1 -Group 'WebApps-2020' < usersLists/sample-group.txt
creates users from the usersLists/sample-group.txt file in the group called WebApps-2020 by the Settings.json configuration file.
Create-WebsiteUsers.ps1 creates for each given user following:
- the user itself in the Virtualmin's virtual server
- the user's home directory
- the user's temp directory stored in the user's home directory
- the user's database with the almost same name like the user has (MySQL restrictions are applied during generation of the DB's name)
- security-related Apache and PHP configuration file stored in apacheUsersSettings (see Configuration section)
./Backup-WebsiteUsers.ps1 < usersLists/sample-group.txt
backups users from the usersLists/sample-group.txt file by the Settings.json configuration file.
Backup-WebsiteUsers.ps1 backups in backupDir for each given user following:
- the user's home directory to a zip file
- the user's database as a SQL script
./Remove-WebsiteUsers.ps1 < usersLists/sample-group.txt
removes users from the usersLists/sample-group.txt file by the Settings.json configuration file.
Remove-WebsiteUsers.ps1 removes everything that Create-WebsiteUsers.ps1 creates.