cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2513
Views
5
Helpful
4
Replies

How to reset user expire date on cisco nx-os device configuration

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. 

4 Replies 4

balaji.bandi
Hall of Fame
Hall of Fame

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)

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

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.

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,

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

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.