Skip to content

THE NUCLEAR GEEKS

Complete Reference

  • DevOps
    • Jenkins
      • Jenkins Introduction
      • Jenkins Architecture
      • Install Jenkins on AWS EC2 Instance
      • Build your first project in Jenkins
      • Building a Spring Boot Application in Jenkins
    • Install Java on EC2
    • AWS
      • What is IAM in AWS
      • IAM Components
      • IAM Role vs User
      • How to create IAM User in AWS step by step
      • What are IAM Policies in AWS
      • How to write IAM Policies in AWS.
      • Virtual Private Cloud in AWS
    • DevOps Introduction and Lifecycle
    • What is DevOps?
    • Continuous Integration vs Continuous Delivery vs Continuous Deployment
    • Ansible Installation
    • Linux commands for devOps engineer
    • Ansible Architecture
    • First Chef Cookbook recipe using AWS and chef Server
    • Git Commands Cheat Sheet
    • Introduction to Ansible
    • Install Jenkins inside Apache Tomcat
    • Configure Jenkins slave on linux
  • AWS
    • Windows Server on AWS
  • Languages
    • iOS | Swift
      • Swift let vs var
      • iOS App Lifecycle
      • Fastlane Snapshot: iOS
      • Guard in Swift
      • Functions in Swift
      • Swift Delegates and Protocols
      • Swift let vs var
      • Implicitly Unwrapped Optionals in Swift
      • Relationship between Classes
    • TypeScript
      • INTRODUCTION TO TYPESCRIPT
      • GETTING STARTED WITH TYPESCRIPT
      • Data Types in TypeScript
    • Python
      • Full Stack Python
      • Data Types: Python
      • Python Flask web service
      • Library in Python
      • String in Python
      • Understanding lists in Python
  • Linux | Shell
    • Embedded
      • REST-ing with Raspberry Pi
    • Linux
      • Some notes on Notification Chain- Linux Kernel
      • Working with Insight, a Graphical Debugger
      • Generics with make and make files
      • Some notes on Notification Chain- Linux Kernel
      • Boot-up with U-Boot
      • U-Boot Running inside U-Boot
      • Networking in Linux – Part 1
      • Networking in Linux – Part 2
      • Input Output redirection in linux
      • Pipes in linux programming
      • Linux commands for devOps engineer
  • More
    • Tech | Gadgets | Tips
      • Tips to crack Programming Interviews
      • Save your Phone’s battery with these Tips
      • Know about the world’s first foldable phone
      • 5 – Top Tech trends for 2019
      • Top 5 Programming Languages to learn in 2019
      • Introduction to OutSystems
      • BIG DATA AT A GLIMPSE
      • Building an app without Coding
      • Introduction to Automation Testing
      • What is Blockchain
    • DSP
      • DSP Icebreaker – FFT and its interpretation. Windowing
      • DSP Icebreaker – Drawing a Sine Wave in python of 100 Hz
      • DSP Icebreaker – Adding white noise to signals, the proper way.
  • Python
  • Swift

The Password Story

“Oh, It’s complicated!”

– Most of us

This is the story of that everyday you, fallen in love with the linux for it’s serene beauty, robust handsomeness or maybe you wanted to flirt with flair and flavor of linux.. you know the reasons!

We evolved from the humble, shy black-background-green-text beginnings to sassy, flirtatious, almost seductive linux flavours. Oh boy! that relation has came too far.
From geeking out onto the terminals, to theming the heck out of our linux systems to make them look like the sci-fi spaceship console or punk garage band advertisement whatever.. we did it all. As we progressed so did our insecurities and those linux angels decided to tighten the screws and In comes the “Password Complexity”.

This thing wasn’t there when we (At least I) started out. In those olden days we could simply install ubuntu and can login with out standard 12345 password and it didn’t complain, uh huh! not a word. You get into system and do your ls, cp, mv.. oh those days.. how I miss them. We humans are notorious for our self-sabotaging ways, so we did here too. We lost the pleasure of 12345 in ubuntu because bad apples between us wanted the piece of every open cake they found.

So, call this my random rant, my answer to your question of why can't I login with my CORRECT password?

Would you look at that aberration? Turns out no matter what you do, it won’t let you in! Apparently ubuntu strengthened it’s security to avoid regular, dictionary passwords. So what did I do? like a nice human the first thought was RESET. Reset the damn password. What option I had? (Refer the images for clarity from hereon)
This was Oracle VirtualBox VM, I went ahead and tried to get into GRUB to reset the password (I mean i remember settting it 12345 but hey Self doubt what can I say!) BUT..

So, If you have Windows. Which you probably have, just statistics you know, you should get those sticky keys disabled. You see what happened there? You got to press SHIFT key when you restart the ubuntu to get into the menu. If you have sticky keys enabled, virtual box will skip over to startup, since your windows host will ping you with sticky keys prompt. So just disable it. It’s easier in windows 8-10-11, you search them. Just press windows key then type Sticky keys you should find your setting. Turn it off.


That aside, you should now be able to get into GRUB MENU by pressing SHIFT key repeatedly as your VM reboots. Choose to become a god for a little second! Go to Advanced options for ubuntu , scroll down to select root

This should drop you into the shell. Type following to reset your user password

$ mount -o rw,remount /
$ passwd 

You may choose to reset root password by not mentioning the user

$passwd 
New password :

In any case if you get ANY warning, you are not getting in via login screen. So what to do?
Set your password to meet complexity requirements. (It’s good practice to meet these requirements while setting password at installation phase!)

  • [1] Use at least 6 characters (8 preferred)
  • [2] Use at least 1 uppercase alphabet.
  • [3] Use at least 1 number.
  • [4] Use at least 1 symbol.
  • [5] It should pass dictionary check (Shouldn’t be easy to guess)
This prompt indicates you have met password requirements successfully

If you do everything right. You are in. You should be on Desktop having fun. But you might be very much like me, forgetful and lazy. And may want to circumvent this security for ease. I got you covered!
Apparently, the Basic password entropy (refer) that’s what it’s called, is controlled via /etc/pam.d/common-password file, the line

password        [success=1 default=ignore]      pam_unix.so obscure sha512

controls the length of password you need to get into system successfully. I mean my anti-virus eats around quarter of memory, plus I am behind firewall, plus this is VM, plus hell I am Lazy, Short password?? YES PLEASEEE! 123 done, Heck 1 and done.
What to do?
This entropy check is controlled by pam_unix module, if you man pam_unix and read some you can understand the above line of code/setting.

 minlen=n
       Set a minimum password length of n characters. The default value is
       6. The maximum for DES crypt-based passwords is 8 characters.

   obscure
       Enable some extra checks on password strength. These checks are
       based on the "obscure" checks in the original shadow package. The
       behavior is similar to the pam_cracklib module, but for
       non-dictionary-based checks.

I just added what I thought explains the setting best. Reading this we now know we can simply remove the word obscure and add minlen=1 at end of this line.Now it should look like

password        [success=1 default=ignore]      pam_unix.so obscure sha512 minlen=1

And you are all set. This is bit of a work but if you are lazy like me, and are at home, NOT IN PRODUCTION environment. This should help you get set and at ease for foreseeable future! Now you can set whatever password you like.

I hope the security-nazis would spare me from nag of how this is bad practice. But hey some of us just want to Home-lab and learn and have fun.
This was a long-long article. I know. But what I hope is, when someone needs to reset password, and or needs to reset complexity, this shall be the one stop shop.
Until next time, see y’all !

Share this:

  • WhatsApp
  • Tweet
  • More
  • Telegram
  • Email

Like this:

Like Loading...

Related

Published by Mohit Wasnik

View all posts by Mohit Wasnik

Posted on 6 Feb 20226 Feb 2022 by Mohit WasnikPosted in LinuxTagged can not login ubuntu, complicatd, correct passowrd, fun linux, Linux, login, login ubuntu, lost password, obscure, one character password, oracle virtual box, pam_unix, password, password entropy, reset password, solution, story, ubuntu, ubuntu 20.x, ubuntu solution.

Post navigation

Previous Previous post: Load variable files Dynamically with respect to the OS using Ansible
Next Next post: Terraform : Chaos to code

Top Posts & Pages

  • Balanced Brackets Hackerrank Solution
  • Declarative Jenkins Pipeline to Deploy Java Web Application.
  • DSP - Linear Phase FIR filters
  • Insert a Node at the Tail of a Linked List HackerRank Solution.
  • How to run Batch Scripts/Commands in Jenkinsfile
  • Merge two sorted linked lists Hackerrank Solution.
  • Insert a node at the head of a linked list in Java HackerRank.
  • Ansible Playbook to copy files from one server to other
  • PYTHON FLASK MYSQL CONNECTION
  • Building a Spring Boot Application in Jenkins
  • The trifecta of ARM, Assembly, and C: Pointers, Registers, and …
  • Competitive Programming: The Road to Becoming a Top Coder
  • The trifecta of ARM, Assembly, and C
  • Taints and Tolerations in Kubernetes
  • Get VM creation time in Azure

Workshop and Seminars

Enter your email address to follow this blog and receive notifications of new posts by email.

Mean Stack

  • Ansible
  • Architecture
  • Artificial Intelligence
  • automation
  • AWS
  • azure
  • Big data
  • Blockchain
  • C
  • C++
  • CAD
  • Chef
  • DevOps
  • Django
  • Docker
  • DSP
  • Embedded
  • Flask
  • GIT
  • HackerRank Questions
  • Interview
  • iOS
  • JAVA
  • Jenkins
  • kubernetes
  • Linux
  • Machine Learning
  • maven
  • OpenShift
  • OutSystems
  • Poetry
  • Python
  • Recommendations and Tags
  • REST
  • Swift
  • Technology
  • Testing
  • TypeScript
  • Uncategorized
Follow THE NUCLEAR GEEKS on WordPress.com

Blog Stats

  • 167,679 hits
Create a website or blog at WordPress.com
  • Follow Following
    • THE NUCLEAR GEEKS
    • Join 170 other followers
    • Already have a WordPress.com account? Log in now.
    • THE NUCLEAR GEEKS
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...
 

You must be logged in to post a comment.

    %d bloggers like this: