官术网_书友最值得收藏!

Locking user accounts

Okay, you've just seen how to have Linux automatically lock user accounts that are under attack. There will also be times when you'll want to be able to manually lock out user accounts. Let us look at the following example:

  • When a user goes on vacation and you want to ensure that nobody monkeys around with that user's account while he or she is gone
  • When a user is under investigation for questionable activities
  • When a user leaves the company

In regard to the last point, you may be asking yourself, "Why can't we just delete the accounts of people who are no working here?" And, you certainly can, easily enough. However, before you do so, you'll need to check with your local laws to make sure that you don't get yourself into deep trouble. Here in the United States, for example, we have the Sarbanes-Oxley law, which restricts what files that publicly traded companies can delete from their computers. If you were to delete a user account, along with that user's home directory and mail spool, you just might be running afoul of Sarbanes-Oxley or whatever you may have as the equivalent law in your own home country.

Anyway, there are two utilities that you can use to temporarily lock a user account:

  • Using usermod to lock a user account
  • Using passwd to lock user accounts
主站蜘蛛池模板: 射阳县| 山西省| 黑河市| 迁西县| 镇坪县| 宜君县| 禹城市| 阜南县| 保德县| 鸡泽县| 永仁县| 上蔡县| 台安县| 油尖旺区| 江油市| 岢岚县| 新乡市| 兰坪| 察哈| 濮阳县| 三台县| 青河县| 台州市| 大渡口区| 怀安县| 栖霞市| 海口市| 泾阳县| 怀柔区| 广昌县| 隆昌县| 射洪县| 金堂县| 铁岭市| 广灵县| 静宁县| 岐山县| 永福县| 三台县| 高密市| 平和县|