본문 바로가기

OS 관련 지식/솔라리스(Solaris)

[솔라리스] 크론 로그(cron log)에 "!bad user" 라고 나올 때 조치방법

* 크론 로그(cron log)에 "!bad user" 라고 나올 때 조치방법

 

 if a user′s cron job fails to run, check the /var/cron/log for the following entry:

 "!bad user"
 This is usually the result of the user′s password having expired when password aging is activated.
 Cron now checks that the user′s password is valid before executing the job.
 Disable password aging, create a new user password, and reenable password aging

 

 만약 사용자의 cron job의 실행이 실패한다면, /var/cron/log 파일이 아래와 같은지 확인하라.

 이것은 보통 password aging이 동작할때 사용자의 passsword가 기간만료됐기 때문이다.

 cron은 사용자의 password가 job을 실행시키기 전에 유효한지 확인한다.

 password aging을 쓸수 없게 하고, 새로운 사용자 password를 만들고, password aging을 다시 사용할수 있게 해라.

 

발생한 문제 : sys 계정으로 cron job을 실행했을때 위와 같은 에러메세지 발생
* 원인 : shadow file 의 sys 계정의 패스워드 부분이 "*LK*" 이렇게 되있었다.

* 해결 : shadow file을 다음과 같이 수정한다.

           "sys:NP:6445::::::" (또는 비밀번호를 변경 / 등록 해줘도 LK 가 풀린다~!)

[참고] 수정 후에도 bad user or setgid failed 라는 에러 문구가 올라올 경우, cron 을 재기동 해주면 된다