This snippet is more than 5 years old and may no longer be best practise, test before use.

User Creation and Deletion and add them to sudoers and a custom linux user group


Add and remove a user on a linux server set the password and add them to the list of sudoers. 

 

The 'psaserv' group is for plesk so the user can have access to the plesk files

Code: