script

Create user with restricted access to own directory

Create a new user with it’s home directory set to the one you need him to have access to (this command must be run under sudo or in root shell): adduser –home /restricted/directory restricted_user This will create an user restricted_user, the directory /restricted/directory and then…

Create user with assigned DB script

#!/bin/bash echo-n „Enter the MySQL root password: “ read-s rootpw echo-n „Enter database name: “ readdbname echo-n „Enter database username: “ readdbuser echo-n „Enter database user password: “ readdbpw db=“create database $dbname;GRANT ALL PRIVILEGES ON $dbname.* TO $dbuser@localhost IDENTIFIED BY…