cancel
Showing results for 
Search instead for 
Did you mean: 
MangoRender
Flight Engineer
Flight Engineer
  • 5,377 Views

Error on Lab: Manage Local Users and Groups

Jump to solution

I keep 'Failing' this lab due to some issue. The specific fail line is the "Verify the password expiration for users in the consultants group." I've confirmed that the /etc/login.defs file is to PASS_MAX_DAYS 30 and that all the consultant accounts are set to expire 90 days from the current day. 

For the last step 

  1. Additionally, force the consultant1, consultant2, and consultant3 users to change their passwords on the first login.

I had initially used the chage -M 0 option to force the password change but even tried the option in the solution chage -d 0. Still 'Failing'. 

Just posting here to see if it's an issue that needs to be fixed on RH's side or maybe it's something I missed.

Has anyone else had/has this issue?

31 Replies
JayBee91
Mission Specialist
Mission Specialist
  • 236 Views

Ok, I just went and re-ran that lab and ran the command exactly as shown from the Solutions in the Instructions and they all Pass EXCEPT for the Verifying default password expiration of users on serverb still shows Fail.

grep PASS_MAX_DAYS /etc/login.defs shows:

PASS_MAX_DAYS 30

Any ideas why all the other tasks Pass but this one Fails?

Screenshot 2025-09-23 at 15.05.11.png

shashi01
Moderator
Moderator
  • 232 Views

@JayBee91 @87951469 

Please run the following commands on serverb and share the output with me:

for u in consultant1 consultant2 consultant3; do
echo "== $u =="
getent shadow $u | cut -d: -f5
chage -l $u | grep "Maximum"
done

grep ^PASS_MAX_DAYS /etc/login.defs

useradd testuser && getent shadow testuser | cut -d: -f5; userdel -r testuser

0 Kudos
JayBee91
Mission Specialist
Mission Specialist
  • 229 Views

shashi01, thanks for the quick reply. Here are the command I ran as well as the results of your commands:

 

Screenshot 2025-09-23 at 15.15.25.png

Screenshot 2025-09-23 at 15.17.12.png

shashi01
Moderator
Moderator
  • 226 Views

@JayBee91 

Please also attach your lab grade here for reference

JayBee91
Mission Specialist
Mission Specialist
  • 220 Views

Here's the latest result when I run lab grade users-review from the workstation:

Screenshot 2025-09-23 at 15.22.35.png

shashi01
Moderator
Moderator
  • 181 Views

@JayBee91 

I hope everything is working fine now.

JayBee91
Mission Specialist
Mission Specialist
  • 174 Views

@shashi01 Yes! I very much appreciate your workaround and as you can see below, all my tasks are showing Pass. 

Thank you very much for all the help!

Screenshot 2025-09-23 at 17.00.46.png

shashi01
Moderator
Moderator
  • 158 Views

@JayBee91 

That’s wonderful to hear!. 

Keep up the great work, and don’t hesitate to reach out if you run into any more issues. Happy learning!

0 Kudos
Andrew
Flight Engineer
Flight Engineer
  • 112 Views

Any shot we can get an elaboration on "the workaround"? Perhaps I missed it in thread -  if so, I appreciate a pointer to it.

In the shared screencap I can see we're using sed to alter the parameter for PASS_MAX_DAYS in /etc/login.defs, but that doesn't seem like the magic bullet when that parameter was already properly set (if I followed the thread posts). Then I can see we remove default_user and create a checkuser and all is well with it. 

But I seem to be missing the actual "workaround".

 

Among the reasons I ask is that I have seen fails on this lab when (as best I can remember/tell without a live example in front of me) the "x number of days" date passes over a timeline/dateline cutoff. We could use command sub for the chage dates, and it would still fail. But we could change it to required days+1 and it would then "grade" fine. I never really nailed it down causally, and just rolled with it as "one of those things to know about our environment", because no matter the environment, there's always those things that should do but don't, or should not do but does. Eventually we can find a cause, but it's not always worth the time/effort.

Thank you for reading.

shashi01
Moderator
Moderator
  • 104 Views

@Andrew 

Screenshot From 2025-09-24 19-11-42.png

Thank you for pointing this out. I have created a workaround from my side, and it seems to be working perfectly now. Please follow the steps shared in the screenshot, then log out from root@serverb and check the lab grade from student@workstation.

 

Created workaround from my side, but I still need to check and dig deeper into this issue

For now, this should help you proceed without blocking further progress.

Thank you for your patience and for raising this.

Join the discussion
You must log in to join this conversation.