Вопрос

We can use the chage command to update the PASS_MAX_DAYS(maximun number of days a password may be used) of a user. Does linux provide some command or solution to manage this on group level? For example, The PASS_MAX_DAYS of group user is 30 days. This means all the users in user group should change their password in 30 days?

Это было полезно?

Решение

for member in `groupmems  -g YOUR_GROUP_NAME --list`;do chage -M 30 $member ;done
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top