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

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -