Skip to content
vabalcar edited this page Jul 8, 2020 · 1 revision

Usage

List of users

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.

Groups

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 users

./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 users

./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 users

./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.

Clone this wiki locally