User and Group Operations

User and Group Operations

User and Group Operations

Prior to the delete operation – the following line can be used to delete the user’s files “with a find and delete operation” that are outside of the home folder.

The groups program is useful in finding out which groups that a user belongs to and can be run as shown here:
To add omer to the ftp-users group

$ groups omer
users, staff
A user logged onto a system can only work as a group member, in terms of privileges. When a user logs on to a system, by default they are categorized as a member of the main group.
The user can switch to an active group using the newgrp program.Example:
If Burak would like to switch from the users group to the staff group, this can be done using the following line:

A user can query the user group they are currently connected with the id command, it can be used to view the user’s id and other related information:
$ id
uid=500(burak) gid=550 groups=500,550
The root user can grant any user a new password without having to enter their user information:
# passwd burak