---
title: "Discussion on \"Day 5: Advanced Linux Shell Scripting for DevOps Engineers with User Management\" | Hashnode"
description: "Discussion on \"Day 5: Advanced Linux Shell Scripting for DevOps Engineers with User Management\". Automate user accounts, enhance efficiency, and streamline tasks in Linux shell scripting for DevOps. Stay updated on this DevOps journey"
url: "https://hashnode.com/posts/day-5-advanced-linux-shell-scripting-for-devops-engineers-with-user-management/66863d81a2bbc29831ef85a4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Day 5: Advanced Linux Shell Scripting for DevOps Engineers with User Management](https://priyadarshi.hashnode.dev/day-5-advanced-linux-shell-scripting-for-devops-engineers-with-user-management?utm_source=hashnode&utm_medium=feed)

Automate user accounts, enhance efficiency, and streamline tasks in Linux shell scripting for DevOps. Stay updated on this DevOps journey

Jul 4, 2024 · 4 min read · priyadarshi.hashnode.dev  
Read the article

-   [#90daysofdevops](https://hashnode.com/tag/90daysofdevops)
-   [#90daysofdevops-chanllenge](https://hashnode.com/tag/90daysofdevops-chanllenge)
-   [#tws](https://hashnode.com/tag/tws)
-   [#devops](https://hashnode.com/tag/devops)
-   [#devops-articles](https://hashnode.com/tag/devops-articles)
-   [#devops-journey](https://hashnode.com/tag/devops-journey)
-   [#linux](https://hashnode.com/tag/linux)
-   [#linux-for-beginners](https://hashnode.com/tag/linux-for-beginners)
-   [#linux-shell-scripting](https://hashnode.com/tag/linux-shell-scripting)

## Written by

[priyadarshi ranjan](https://hashnode.com/@Darshi1108)

@Darshi1108 · India

  
[View profile](https://hashnode.com/@Darshi1108)

Empowering seamless software delivery through robust automation and efficient infrastructure management.

Greetings! 👋 I'm Priyadarshi Ranjan, a dedicated DevOps Engineer embarking on an enriching journey. Join me as I delve into the dynamic realms of cloud computing and DevOps through insightful blogs and updates. 🛠️ My focus? Harnessing AWS services, optimizing CI/CD pipelines, and mastering infrastructure as code. Whether you're peers, interns, or curious learners, let's thrive together in the vibrant DevOps ecosystem. 🌐 Connect with me for engaging discussions, shared insights, and mutual growth opportunities. Let's embrace the learning curve and excel in the dynamic realm of AWS and DevOps technology!

## Responses

Markdown supported · ⌘↵ to post

[priyadarshi ranjan](https://hashnode.com/@Darshi1108)

[Jul 4, 2024](https://hashnode.com/posts/day-5-advanced-linux-shell-scripting-for-devops-engineers-with-user-management/66863d81a2bbc29831ef85a4/comment/6686edd08ad44b8c27e7a2a8)

useradd -m -p "$(openssl passwd -1 $password)" "$username" is used to create a new user account with specific options

useradd: This command adds a new user to the system

\-m: Creates the user's home directory if it doesn't exist

\-p "$(openssl passwd -1 $password)": Sets the user's password securely. Here, openssl passwd -1 $password generates an encrypted password hash using OpenSSL's MD5 algorithm (-1 flag). This hash is then passed to -p for setting the user's password.

"$username": Specifies the username for the new user. Real-life Example: Imagine a scenario where a DevOps engineer automates user account creation across multiple servers. They use this command in scripts to ensure that each new user has a secure password and a home directory, ensuring consistency and security across the infrastructure.  
[Sibasundar Sahoo](https://hashnode.com/@Sibasundar01) you can check this

[Sibasundar Sahoo](https://hashnode.com/@Sibasundar01)

[Jul 4, 2024](https://hashnode.com/posts/day-5-advanced-linux-shell-scripting-for-devops-engineers-with-user-management/66863d81a2bbc29831ef85a4/comment/6686cd029f8b99a7abce9a35)

Could you please explain what is the execution of this line with all flags ---> useradd -m -p "$(openssl passwd -1 $password)" "$username"
