새로운 사용자 계정을 만든후 첫 로긴시 비밀번호를 강제로 변경

hunkim의 이미지

레드헷7.3을 사용하고 있는데
몇몇 사용자들의 아이드를 만들어주어야 할 일이 생겼습니다.

제가 임으로 비밀번호를 정해 만든다음 해당하는 사용자가
첫번째 로그인 할때 자동으로 비밀번호를 바꿀 수 있도록
하려고 하는데 어떤 방법이 좋은지요?

adduser 명령에 그런 옵션은 없는것 같던데...

불량도ㅐㅈㅣ의 이미지

Quote:
Password expiry information
The password aging information may be changed by the super
user with the -x, -n, -w, and -i options. The -x option
is used to set the maximum number of days a password
remains valid. After max days, the password is required
to be changed. The -n option is used to set the minimum
number of days before a password may be changed. The user
will not be permitted to change the password until min
days have elapsed.
The -w option is used to set the num-
ber of days of warning the user will receive before their
password will expire. The warning occurs warn days before
the expiration, telling the user how many days until the
password is set to expire. The -i option is used to dis-
able an account after the password has been expired for a
number of days. After a user account has had an expired
password for inact days, the user may no longer sign on to
the account.

passwd 옵션에서 -n -i 옵션을 잘 쓰면 될것 같네요.

man passwd

문근영 너무 귀여워~~