Limiting the login capabilities of users

A major role of a system administrator is to configure and manage users and groups on a Linux system. It also involves the task of checking the login capabilities of all users.

Getting ready

All the steps given below have been tried on an Ubuntu system; however, you can also follow these on any other Linux distribution.

How to do it...

Here we will discuss how the login capabilities of users can be restricted on a Linux system:

  1. We can restrict the access of a user account by changing the login shell of the account to a special value in the /etc/passwd file. Let's check the details of an account, sslh as an example, in the /etc/passwd file, as shown:
    cat /etc/passwd | grep sslh
    
  2. In the preceding details, the final ...

Get Practical Linux Security Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.