# Day 2/100 of DevOps

### Task: Create a user named “jim” on App Server. Set the expiry date to 2024-02-17, ensuring the user is created in lowercase as per standard protocol.

1. SSH into App Server
    
    `ssh tony@stapp03`
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762268802595/178aea1a-5e79-46a0-b99f-12c76028ee12.png align="center")

2. Check if the user is already present or not.
    
    `id jim`
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762269099360/57716088-ce69-4779-8d2d-b912cc7c5d14.png align="center")

3. Switch to root user
    
    `sudo -i` or `sudo su -`
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762269187530/a053436f-8e65-4dbb-8d79-edbb30da2353.png align="center")

4. Create/ Add the user and verify it with usind `id` command
    
    `useradd jim`
    
    `id jim`
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762269207674/84e7dd0e-9366-4baf-aa23-31508b0d6f9d.png align="center")

5. Use `chage` command with `-l`
    
    **Chage** command is used for monitoring and changing the user password expiry date.
    
    **\-l** option lists all current password aging details of a user.
    
    Here, the account expires is **never**.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762269254660/cfb93470-31f5-4612-aa35-19c90fd719f8.png align="center")

6. To set the expiry for the user
    
    `chage -E 2024-02-17 jim`
    
    Now, again verify using chage -l command:
    
    `chage -l jim`
    
    Now, you can see Account Expires has been changed to the mentioned date.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1762269364425/d401da9b-401d-4963-8ad1-a1f7b1670aee.png align="center")

**Note: You can use** `chage -help` **command to see other options that can be used with chage command.**
