Bypass BAD PASSWORD: The password fails the dictionary check Debian 11

How to bypass BAD PASSWORD: The password fails the dictionary check – it is based on a dictionary word on Debian 11.

in /etc/pam.d/common-password add dictcheck=0 to the line below:

#nano /etc/pam.d/common-password
#password requisite pam_pwquality.so try_first_pass local_users_only authtok_type= minlen=8 retry=3 difok=3 enforce_for_root
password requisite pam_pwquality.so try_first_pass local_users_only authtok_type= minlen=8 dictcheck=0 retry=3 difok=3 enforce_for_root

ADD dictcheck=0

Sudo user in Debian

Install the “sudo” Command
You need to run this command as root user:

user@debian:~$ su -
Password:
root@debian:~ # apt-get install sudo

Create a new user account.

#/usr/sbin/adduser admin

Add the user to the sudo group; By default on Debian systems, members of the group sudo are granted with sudo access. To add a user to the sudo group use the usermod command:

#usermod -aG sudo admin

Check the sudo access

#id admin
uid=1001(admin) gid=1001(admin) groups=1001(admin),27(sudo)

The user admin a member of sudo group now and to work as a root, every command must start with sudo (sudo reboot, sudo vim, sudo del, sudo mkdir, sudo……)

Error and solutions

admin@debian9:~$ sudo ifconfig
sudo: unable to resolve host (none)

Solutions

Insert hostname to /etc/hostname and /etc/hosts something like:

127.0.0.1    localhost.localdomain localhost
127.0.1.1    debian9

Add new User Group on CentOS 6 terminal

To add a New User and Assign a Group on CentOS 6 terminal

#useradd -g <groupname> username

For instance, lets say you wanted to add a new user named user to the apache group:

#useradd -G apache user

And then you’ll want to assign a password for that user, of course:

passwd user

Add or update User to an an Group

#usermod -a -G <groupname> username

Change a User Primary Group

Sometimes a user has many group, this is switch out the primary group that a user is assigned to with this command:

#usermod -g <groupname> username

View a User Group Assignments by use the id command to see what groups the user is assigned to:

id <username>

This will display output something like this:

uid=500(howtogeek) gid=500(howtogeek) groups=500(howtogeek), 1093(admins)