100 Days DevOps “KodeKloud”

Updated 2 October 2025

Day 1: User Creation with Non-Interactive Shell

It was required to login to the another server which can be done using the “SSH”.

For the purpose of interactive user, we can use the following command:

bash
useradd -s /sbin/nologin rose

Here the flag of -s is used for setting the shell and the shell /sbin/nologin ensures that the user is created with no-login.

We can verify this by using the following command:

bash
getent passwd rose

It will show the following:

bash
rose:x:1002:1002::/home/rose:/sbin/nologin
Day 2: Temporary User Setup with Expiry

Task was to create a user with a expiry date. This task can be performed by the use of ‘-e’ flag with useradd.

The command will be:

bash
sudo useradd -e <date> <username>
sudo useradd -e 2024-01-28 ravi

We can verify the change by the use of chage command.

bash
sudo chage -l ravi
Last password change                                    : Oct 01, 2025
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : Jan 28, 2024
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7
Day 3:
Spotted a mistake or want something added? Send me a note.