How to disable account expiration and mandatory change of password after it expires in linux?

924

Have you tried:

passwd -x -1 -n -1 -w -1 ${USER}

It may produce the same result but it could do the trick.

Share:
924

Related videos on Youtube

fixulate
Author by

fixulate

Updated on September 18, 2022

Comments

  • fixulate
    fixulate almost 2 years

    I have an S3 bucket called 'mybucket' which is fronted with a cloudfront distribution. I have configured a cloudfront Origin Access Identity (OAI) and set the bucket policy as follows:

    {
        "Version": "2008-10-17",
        "Id": "PolicyForCloudFrontPrivateContent",
        "Statement": [
            {
                "Sid": "1",
                "Effect": "Allow",
                "Principal": {
                    "AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity XXXXXXXXXXXX"
                },
                "Action": "s3:GetObject",
                "Resource": "arn:aws:s3:::mybucket/*"
            }
        ]
    }
    

    So now when I request a file via cloudfront, it works as expected and serves files, but direct access via S3 is prevented. Awesome.

    My problem is that this bucket policy only applies to new/freshly uploaded files and not the existing files in the bucket. I would have thought the policy at the bucket level would be applied to all files? Do I need to re-upload everything in my bucket or is there a way to push this new bucket policy to all existing objects?

    • Patrick
      Patrick about 7 years
      Can you do chage -M -1 test?
    • Jayaprakash Nagarajan
      Jayaprakash Nagarajan about 7 years
      tried no luck still asking to change the password
    • AfroJoe
      AfroJoe about 7 years
      try forcing a new password with passwd
    • Jayaprakash Nagarajan
      Jayaprakash Nagarajan about 7 years
      requirement is we should not change the current password