Ninja SysAdmin Logo
  • Home
  • Blog
  • About Me
  • Calendar of Events
  • Privacy Policy

Tag Archives: reset

Force User To Change Password At Next Login on AIX/UNIX

Posted on December 31, 2015December 31, 2015 by James Triplett

As an AIX/UNIX Administrator, there will be times where you will want to require a user to change their password at next login.

A great example of this is after setting up a new user with a generic password.

To require or force a user to change their password at next or even their first login, login as root or use sudo to run the following command:

pwdadm -f ADMCHG username

 

Substitute username with the actual user’s name of course.

At the user’s next login, they will be required to enter their current password and set a new password.

redhat

Troubleshooting RHEL – Account Locked Due To Failed Logins

Posted on December 1, 2015December 1, 2015 by James Triplett

When attempting to su to another user, in this case mysql, you receive the message “Account locked due to xx failed logins”

Condition – /etc/pam.d/password-auth has already been configured

Even if you reset the password in Linux by using the following command, you still receive the message.

passwd username

Attempt to switch user to mysql

[user@host ~]$ su mysql
Account locked due to 10 failed logins
Password:
su: incorrect password

Check the counter for the specific user with the following command:

[root@host user]# pam_tally2 --user=mysql
Login           Failures Latest failure     From
mysql             17    12/01/15 09:14:42  pts/3

Reset or unlock the user account to enable access again

[root@host user]# pam_tally2 --user=mysql --reset
Login           Failures Latest failure     From
mysql             17    12/01/15 09:14:42  pts/3

Verify the counter has been reset for specific user

[root@host user]# pam_tally2 --user=mysql
Login           Failures Latest failure     From
mysql               0

Should be able to login as user now with no problem

[user@host ~]$ su - mysql
Password: EnterPassword
[mysql@host ~]$

The PAM module is part of all Linux distribution. Do ‘man pam_tally2‘ from the command line to learn more about it.

Categories

Recent Posts

  • Understanding The Linux /etc/passwd File
  • How To Change Email Sender Name on WordPress Site
  • This account is currently not available – Linux
  • How To Make Writing to .bash_history Immediate
  • Enable Delete Confirmation Dialog In Windows 10
  • Is Your ISP Limiting or Shaping Your Traffic?
  • How To Export PUTTY Sessions List
  • Force User To Change Password At Next Login on AIX/UNIX

Follow Me On Twitter

Follow @oneofkarma

Colleague Network

Phil Schaefer

Useful Links

DownDetector.com
DNS Goodies
IP Reputation - Barracuda
IP Reputation - Cyren
ISO - Pre-Built Images For OpenStack
MXToolbox
Open Port Tester
Public DNS Servers
Passwords - Generate Strong Passwords
Passwords - How Secure Is Yours
WhatIsMyIP

Great Gift Idea

Birchbox
For Men and Women

Tags

10 account aix bash centos change check cmd command date disable domain download error featured file free google hyper-v hyper-v server 2012 install installation iptables line linux microsoft mysql name password powershell prompt red hat redhat rhel search security server core switch time unix version web website windows wordpress
A Blog By James Triplett
A SiteOrigin Theme