Hello Automation!

Hello Automation!

Hi, in this fast-moving world each one of us wants to be as fast as possible. Such as to get fast service, to get fast results or enhance more optimal ways of doing or performing tasks.

I was just working and adding some local users in my Linux system. Each time I encounter the repetition of tasks or commands. I got fed up. WHAT I AM DOING!!!!

So, I've written two "Shell Scripts" one for normal "user creation" and other for "user creation with password generation". In the second script, the user will get a random password which he or she needs to change after the first login, the same concept is followed in the first script with the exception of random password generation.

Check out the screenshots below to get more and better understanding and see the power of automation:

No alt text provided for this image

Here, the script is asking me for a username, full name (Used as a comment) and the password. As the user is created, and when you switch it to the newly created user using your terminal you'll get this:

No alt text provided for this image

Here, the user needs to change my password after login.

Now the next work:

No alt text provided for this image

Here, the script is asking me for the username as a "parameter" as I enter the username it will take care of the rest.

No alt text provided for this image

When you switch, on to the user you need to copy the randomly generated password for the first-time login.

No alt text provided for this image

And nowhere, you can change your password.

These scripts are available on my Github account, give it a try!

Aastha Saxena

Software Engineer | NodeJs | TypeScript | MySQL | MongoDB

4 年

Well done

Neel Desai

Ex- Radisys | Software Engineer(Devops) at SAP Labs India

4 年

Went through the code hosted on github, in password_generation why we are using an sha256sum, which includes a or condition with head to see first 20 line ? The code seems good, will check if can any modification to make it more reliable. And also a good work it can save a lot of time while creating multiple user logins.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了