~/.cache/motd.legal 표시 파일의 자동 생성을 중지하려면 어떻게 해야 합니까?

~/.cache/motd.legal 표시 파일의 자동 생성을 중지하려면 어떻게 해야 합니까?

내 Ubuntu 서버의 모든 홈 디렉터리에는 .cache빈 파일이 들어 있는 폴더가 있습니다 motd.legal-displayed. 이러한 폴더 생성을 중지하는 방법이 있습니까 .cache?

답변1

참조 man update-motd/etc/update-motd.d

motd 비활성화

그 안에 /etc/pam.d/login있는 줄을 보고 주석 처리하세요. SSH도 문제가 되는 경우 session optional pam_motd.so이 작업을 수행할 수도 있습니다 ./etc/pam.d/sshd

motd를 완전히 제거

이렇게 하면 motd와 관련된 모든 항목이 제거됩니다(또한 motd.legal-displayed).

sudo apt-get remove --purge update-motd

답변2

예, 이제 motd 파일이 다른 패키지 안에 있는 것 같습니다. update-motd 패키지에는 superceded by pam_motd in libpam-modules전체 libpam 모듈을 제거할 수 없으므로(?) motd를 제거하려면 파일을 수동으로 제거해야 한다고 나와 있습니다.

/lib/i386-linux-gnu/security/pam_motd.so

그리고 당신이 원한다면:

/usr/share/man/man5/update-motd.5.gz  (libpam-modules)
/usr/share/man/man8/pam_motd.8.gz  (libpam-modules)
/usr/share/base-files/motd  (base-files)
/etc/update-motd.d/  (base-files)
/usr/share/man/man5/motd.5.gz  (manpages)

관련 정보