8

On AIX 6100-05-02-1034, something is frequently changing the permissions of the /etc/passwd file to 640. That's bad...

How could I trace that what is chmoding the file? There is no history 1000 | fgrep -i chmod, I think a process is chmoding the file, but which one? dtrace can do this? it's not on AIX

LanceBaynes
  • 40,135
  • 97
  • 255
  • 351

2 Answers2

7

Dtrace would be nice but it's not ported on AIX.

You should be able to trace what is chmoding the file with auditing: http://www.ibm.com/developerworks/aix/library/au-audit/

jlliagre
  • 61,204
0

At first I'd open a problem record with IBM as that sounds like broken code and should be fixed. I personally only had similar issues with /etc/resolv.conf also not readable by others, and when it belongs to root:system that might be a problem.

The pointer to audit subsystem is correct, although the famous developerworks URL-randomizer struck, and the above link is not working anymore. Check e.g. http://www-01.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.security/monitor_file_access_realtime.htm or the archived page: https://web.archive.org/web/20080328022606/http://www.ibm.com/developerworks/aix/library/au-audit/

For the event selection, you should try with FILE_Write and maybe in addition FILE_Mode, FILE_Privilege and/or FILE_Acl

doktor5000
  • 2,699