Authentication token is no longer valid

Source: Internet
Author: User

Linux:authentication token is no longer valid

problem:
Authentication token is no longer valid; New one required
You (Zabbix) is not a allowed to access to (crontab) because of Pam configuration.

PAM Configuration

The/etc/pam.d/directory contain the PAM configuration files for each Pam-aware application. Each service has a file in THE/ETC/PAM.D which have the same name as the service.

For Instance, the Crond service Pam file is below:

  
 
  1. [/etc/pam.d]$more crond
  2. #
  3. # The PAM configuration file for the cron daemon
  4. #
  5. #
  6. # No PAM authentication called, auth modules not needed
  7. account required pam_access.so
  8. account include password-auth
  9. session required pam_loginuid.so
  10. session include password-auth
  11. auth include password-auth
PAM Configuration File Format

Module_interface Control_flag module_name module_argument

 
   
  
  1. < Span class= "PLN" >account required pam_access so
  2. account include password - auth
  3. Session Required Pam_loginuid so
  4. session include password - auth
  5. Auth include password - auth

Module_interface:
Auth: This module interface the authenticates use. For example, it request and verifies the validity of a password.
Account : This module interface verified whether, the access is allowed. For example, it check if a the user account had expired of if a user is allowed to log in at a partical time of day.
Password: This module INTERFCE are used to changing user passwords.
session: This module interface configure and manager user sessions.

PAN Control Flag

Required: The module result must is successful for authentication to continue. If The test fails at this point, the users won't be notified.
requisite: Unlike required,if the test fails, the user would be notified immediately with a message reflectin the F Irst failed required or requisite module test.
Optional: The result is ignored.
include: Unlike the other controls,it does isn't relate to how the module result is handled.

Solution

Because The Crond service must authenticate the user ' s password.
So we can check the user password information:

  
 
  1. chage -l username
  2. Last password change : May 05, 2016
  3. Password expires : Nov 01, 2016
  4. Password inactive : never
  5. Account expires : never
  6. Minimum number of days between password change : 0
  7. Maximum number of days between password change : 180
  8. Number of days of warning before password expires : 30

If you find the password have expired, you can change the password and set the Maxdays to 9999.

 
   
  
  1. password username:
  2. Command : chage -M 9999 username

After this, you can check if the File/etc/shadow have updated the maxdays for the specified user. Just like this:

 
   
  
  1. username:$6$EZ2LtFaZ$l6cUrKMIYW..37AStpjDYlal215FZg3NoKM0SgsUClsllKjVwkxsR4lFtWbNGvaGZkGwi5orqWziDMpfGGhvh/:17107:0:9999:30:::

After all, it'll be OK.



From for notes (Wiz)

Authentication token is no longer valid

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.