Create a password generator using shell scripting Last Updated : 19 Jul, 2019 Comments Improve Suggest changes Like Article Like Report Creating a strong password is often a time-consuming task and even after creating a good password by yourself it gets brute-forced by hackers. In this article, we will learn how to create a strong password which fulfills all requirements including symbols, capitals length etc using a simple shell script in Linux. How to create a password generator using shell script ? This a simple short and quick method, just open the nano editor with .sh file using this command - nano passwdgen.sh You can use any name of the file. Python3 #!/bin/bash # this can be anything of your choice echo "Welcome to simple password generator" # ask the user how much long should be echo "please enter the length of the password" # read the input given by user and store in variable read PASS_LENGTH # loop will create 5 passwords according to # user as per length given by user for p in $(seq 1 5); do openssl rand -base64 48 | cut -c1-$PASS_LENGTH done Save the file and give executable permission using sudo chmod +x command and run the script. Output: Comment More infoAdvertise with us Next Article Create a password generator using shell scripting M Madhusudan_Soni Follow Improve Article Tags : Technical Scripter Linux-Unix Similar Reads Create multiple users using shell script in Linux In Linux, we create users for multiple purposes, so in Linux, it's very common to make new users depending on the tasks. So sometimes we need to create more than one user or multiple users. We can't do it one by one as it would be very time-consuming, so we can use automated scripts to make our task 3 min read Random password generator in C In this article, we will discuss how to generate a random password of a given length consists of any characters. Approach: The below-given program involves basic concepts like variables, data types, array, loop, etc.Follow the below steps to solve this problem:Take the length of the password and dec 2 min read Automated Recursive Encryption in a Directory Using Shell Script This script would encrypt file provided as an argument or a directory and its constituent files and sub-directories recursively. It would be very useful for automating the encryption of multiple files in a directory all together. How it works? If no arguments are given, throw an error and exit the p 3 min read How to Create a Shell Script in linux Shell is an interface of the operating system. It accepts commands from users and interprets them to the operating system. If you want to run a bunch of commands together, you can do so by creating a shell script. Shell scripts are very useful if you need to do a task routinely, like taking a backup 7 min read Shell Scripting - Creating a Binary file While working in Linux systems, we have used so many commands on a day-to-day basis. Most of the commands are in the binary format resides under /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, etc directories. As system administrators, we would have to write many shell scripts to do a few tasks or 4 min read Like