07-16-2021 09:54 AM
Hi, I understand that if I have to set user expire date on nx os device , I can use following command:
username <username> expire <expire_date>
However once I set an expire date on a user, if I want to completely remove the expire date (same as when a user was created fresh) how can I remove the expire date? I do not see any command that takes off the expire date. All I can do is set a new expire date using same command, but how can I take off the expire date completely? Kindly help.
07-16-2021 10:03 AM
I have not tried - but good question.
take example :
username user-id [password [0 | 5] password] [expire date] [role role-name]
remove the user and add back with expiry date - is the only option i see here ( make sure you have alternative admin account before removing any user) - also make sure you change using other user account than (one you removing)
07-16-2021 11:58 AM - edited 07-16-2021 12:01 PM
Thank you for the reply, here are some clarifications:
My objective is to remove expire date from the user, after it has been set. For example,
I create a user "testuser1" with following command:
username testuser1 password password1
Now I am setting an expire date:
username testuser1 expire 2020-01-01 past
This will set the expire date on user in past and make user disabled.
Now I want to enable user back. What option do I have? Set an expire date in future is the one option. However what If I do not want any future expire date on the user, like it was before. I need to take off the expire date from user entirely. How can I do that is my question.
Also, deleting user and creating back doesn't seem to be a good solution because when I delete a user and create back, I need to restore all of user's previous configurations that were set. For example if user have configured bunch of roles, ssh key, certs etc, all I need to create back and it seems complex option.
07-17-2021 02:49 AM
Also, deleting user and creating back doesn't seem to be a good solution because when I delete a user and create back, I need to restore all of user's previous configurations that were set. For example if user have configured bunch of roles, ssh key, certs etc, all I need to create back and it seems complex option.
i have not tested this, is this a pure specific requirement, most of the environments we worked go central ISE(radius authentication) so easy to manage users there.
I do not believe personally remove user and adding user may have another role effect - but as i said this need to be tested,
07-19-2021 08:40 AM
yeah remove and add user resets all properties on a user, so it will not work out.
So the question in simple words, "how to remove expire date from a user, after it has been set once"? Anyone out here kindly help, will appreciate your help.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide