Operate apache

/etc/init.d/apache2 restart

sudo /etc/init.d/apache2 restart

sudo service apache2 restart

Check Ubuntu version:

lsb_release -a

Creating a new user:

sudo adduser UserName

Disallow user from login:

sudo usermod --expiredate 1 UserName

To reenable that account, set expiration date of user to Never:

sudo usermod --expiredate "" UserName




Creating a group:
sudo addgroup groupName

Creating a user into this group:
sudo adduser userName groupName

Adding an existing user to another group:
sudo usermod -a -G groupName userName

Change folder permissions and ownership:
sudo chown -R username:group directory

List the members of a group:
getent group groupname


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s