Next freebie in 28 Hours*
Not every user on linux is equal and many times you would want to create a user but not only limit there access but maybe freeze there account or define for how long will there account be active. That's the main topic of this lesson.
To lock a user we would call this command:
usermod -L demo
and to unlock the user:
usermod -U demo
Notice that we are not deleting the account of the user but not letting the user in when we lock them out. We talked about deleting users a few lessons ago. Another powerful feature is setting an expiration date to a user:
usermod -e 2015-01-01 demo
now we updated the user demo to expire on january first 2015. We can extend that user at any point but once that date would reach the user account would be locked.
Have a question but don't want to ask it publicly? If you are a prime member just ask right here and we will get back to you within 48 hours. Not prime yet? no worries you can ask publicly below.