ubuntu - Linux - User expiration date in hours -


i setting expiration date of linux users account using command below:

chage -e '2017-04-07' username 

however can block user using dates, , when day occurs user blocked.

would have account expire in 24hrs?

tks!

you cannot use 'chage' since require specifying date. if want inactivate user after few minutes, use following

adduser username_here && sleep 600 && usermod --lock username_here 

or

adduser username_here echo usermod --lock username_here | @ + 10 minutes 

Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -