Page 1 of 1

[Solved] How to change the status of an expired user in MCC

PostPosted: Aug 3rd, '15, 10:01
by FiableDotBiz
Hello.
In Mageia 4 drakuser, I have a user marked "expired", so she cannot login. How to change this?
Thank you in advance.

Re: How to change the status of an "expired" user in MCC

PostPosted: Aug 3rd, '15, 14:18
by jkerr82508
It looks as though you've been hit by this bug:
https://bugs.mageia.org/show_bug.cgi?id=16467

Comment #1 of that bug report contains a workaround to enable an "expired" account.

See also viewtopic.php?f=7&t=10103

If you wish to downgrade libuser the command for Mageia 4 is:
Code: Select all
urpmi --downgrade libuser-0.60-2.mga4 lib64user1-0.60-2.mga4

or for a 32 bit system:
Code: Select all
urpmi --downgrade libuser-0.60-2.mga4 libuser1-0.60-2.mga4

Jim

Re: How to change the status of an "expired" user in MCC

PostPosted: Aug 3rd, '15, 14:55
by Latte
jkerr82508 wrote:https://bugs.mageia.org/show_bug.cgi?id=16467

Comment #1 of that bug report contains a workaround to enable an "expired" account.

If you wish to downgrade libuser the command for Mageia 4 is:

As long as the workaround is working I wouldn't recommend a downgrade since the updated version fixed a critical bug: https://bugs.mageia.org/show_bug.cgi?id=16459

Re: How to change the status of an "expired" user in MCC

PostPosted: Aug 3rd, '15, 17:44
by doktor5000
Can you post the output of
Code: Select all
passwd -S username
chage -l username

Workaround

PostPosted: Aug 4th, '15, 03:33
by FiableDotBiz
Thank you very much. In fact, I would improve a bit the workaround, to be executed as root, and which worked for me:
Code: Select all
userdel <username>
groupadd -g <GID> <username>
useradd -g <GID> -u <UID> <username> -c"<User Full Name>"
passwd <username>
usermod -aG <extra group1 ID>,<extra group2 ID>... <username>

where <username> should be replaced by the user's computer username, <GID> by that user's primary group ID number, <UID> by the user ID number, <User Full Name> by his real name (between quotation marks), <extra group1 ID>,<extra group2 ID>... by the non primary groups he should belong too, if any, separated by commas. If not, omit that line. In case there are other members of the primary group, userdel will complain it cannot delete the primary group, so that you don't need the groupadd command line.

@doktor5000:
Code: Select all
# passwd -S firm-suren
firm-suren PS (Password set, blowfish crypt.)

# chage -l firm-suren
Last password change                                    : never
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : -1
Maximum number of days between password change          : -1
Number of days of warning before password expires       : -1

Re: [Solved] How to change the status of an expired user in

PostPosted: Aug 4th, '15, 05:13
by doktor5000
Deleting the user and recreating it is a bit overkill ...

Other solution?

PostPosted: Aug 4th, '15, 06:25
by FiableDotBiz
So what do you propose?

Re: [Solved] How to change the status of an expired user in

PostPosted: Aug 4th, '15, 17:55
by doktor5000
Simply set a new password and then check again, and then change it back to the old one?

Re: [Solved] How to change the status of an expired user in

PostPosted: Aug 11th, '15, 02:00
by FiableDotBiz
Your solution doesn't work:
Code: Select all
# passwd firm-suren
Changing password for user firm-suren.
passwd: Authentication token manipulation error

but it seems the bug is now corrected and the updates, available very soon.