Book Image

Troubleshooting Ubuntu Server

By : Skanda Bhargav
Book Image

Troubleshooting Ubuntu Server

By: Skanda Bhargav

Overview of this book

Table of Contents (16 chapters)
Troubleshooting Ubuntu Server
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

User management and file permissions


We will discuss user management concepts such as creating a user, assigning permissions, and deleting a user in this section. Then, we will discuss file permissions for user and groups.

User management in Ubuntu

In this section, we will discuss how to add users, delete users, give them permissions, and more.

Adding and removing users

To add a new user to your Ubuntu Server, use the following command:

sudo adduser user2

You will be asked to enter some details apart from the username and password for the new user. To delete a user, use the following commands:

sudo deluser user2
sudo rm -r /home/user2

Pay attention here, this operation does not delete the home directory of the user. Adding and deleting groups is similar to that of users. Here's the syntax to add and remove groups:

sudo addgroup groupname
sudo delgroup groupname

Now, to add a user to a group, execute the following command:

sudo adduser user2 groupname

Managing file permissions

Linux is known for...