You (oracle) are not allowed to access to (crontab) because of pam configuration.

You (oracle) are not allowed to access to (crontab) because of pam configuration.

๐““๐“ธ๐“ท Lv6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
[oracle@server01:/home/oracle]$crontab -l
You (oracle) are not allowed to access to (crontab) because of pam configuration.

---ๆฃ€ๆŸฅๅธๅทๆ˜ฏๅฆ่ฟ‡ๆœŸ
[root@server01 ~]# chage -l oracle
Last password change : Aug 16, 2023
Password expires : Nov 14, 2023
Password inactive : never
Account expires : never
Minimum number of days between password change : 1
Maximum number of days between password change : 90
Number of days of warning before password expires : 7

---่ฎพ็ฝฎๅธๅทๆฐธไธ่ฟ‡ๆœŸ
[root@server01 ~]# chage -M 99999 oracle

---้ชŒ่ฏไฟฎๆ”น
[root@server01 ~]# chage -l oracle
Last password change : Aug 16, 2023
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 1
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7


[oracle@server01:/home/oracle]$crontab -l
no crontab for oracle





1.ๆŸฅ็œ‹ๅฎšๆ—ถไปปๅŠกๆ—ฅๅฟ—
tail -200 /var/log/cron

2.ๆŸฅ็œ‹crondๅ†…ๅฎน
more /etc/pam.d/crond

#
# The PAM configuration file for the cron daemon
#
#
# No PAM authentication called, auth modules not needed
account required pam_access.so
account include password-auth
session required pam_loginuid.so
session include password-auth
auth include password-auth

3.ไฟฎๆ”นpamๆ–‡ไปถ:
# cp /etc/pam.d/crond /etc/pam.d/crond.bak
# more /etc/pam.d/crond

account sufficient pam_access.so
account include system-auth
session sufficient pam_loginuid.so
session include system-auth
auth sufficient pam_rootok.so
auth required pam_env.so
auth include system-auth

4.้‡ๅฏcrond
# /etc/init.d/crond restart
# service cornd restart

5.้ชŒ่ฏ
$ crontab -l

  • Title: You (oracle) are not allowed to access to (crontab) because of pam configuration.
  • Author: ๐““๐“ธ๐“ท
  • Created at : 2025-01-24 17:15:39
  • Updated at : 2025-01-24 17:47:51
  • Link: https://www.zhangdong.me/crontab-not-allowed-to-access.html
  • License: This work is licensed under CC BY-NC-SA 4.0.
่ฏ„่ฎบ