伺服器一直顯示session opened for user root by (uid=0)
Red Hat Enterprise Linux AS release 4 (Nahant Update 3)
Kernel 2.6.9-34.ELsmp on an i686
檢視日誌可以發現:
Feb 9 07:35:01 tonykorn97 crond(pam_unix)[1442]: session opened for user root by (uid=0)
Feb 9 07:35:01 tonykorn97 crond(pam_unix)[1442]: session closed for user root
Feb 9 07:40:01 tonykorn97 crond(pam_unix)[1445]: session opened for user root by (uid=0)
Feb 9 07:40:01 tonykorn97 crond(pam_unix)[1446]: session opened for user root by (uid=0)
Feb 9 07:40:01 tonykorn97 crond(pam_unix)[1445]: session closed for user root
Feb 9 07:40:02 tonykorn97 crond(pam_unix)[1446]: session closed for user root
Feb 9 07:45:01 tonykorn97 crond(pam_unix)[1450]: session opened for user root by (uid=0)
Feb 9 07:45:01 tonykorn97 crond(pam_unix)[1450]: session closed for user root
Feb 9 07:50:01 tonykorn97 crond(pam_unix)[1452]: session opened for user root by (uid=0)
Feb 9 07:50:01 tonykorn97 crond(pam_unix)[1453]: session opened for user root by (uid=0)
Feb 9 07:50:01 tonykorn97 crond(pam_unix)[1452]: session closed for user root
Feb 9 07:50:01 tonykorn97 crond(pam_unix)[1453]: session closed for user root
Feb 9 07:55:01 tonykorn97 crond(pam_unix)[1458]: session opened for user root by (uid=0)
Feb 9 07:55:02 tonykorn97 crond(pam_unix)[1458]: session closed for user root
Feb 9 07:56:40 tonykorn97 sshd(pam_unix)[1463]: session opened for user root by root(uid=0)
Feb 9 07:57:28 tonykorn97 crond: crond shutdown succeeded
關閉crond後就沒有這樣的日誌了。
然後在檢視cron日誌發現:
Feb 9 07:25:01 tonykorn97 crond[1435]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Feb 9 07:30:01 tonykorn97 crond[1438]: (root) CMD (/usr/lib/sa/sa1 1 1)
Feb 9 07:30:01 tonykorn97 crond[1439]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Feb 9 07:35:01 tonykorn97 crond[1443]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Feb 9 07:40:01 tonykorn97 crond[1447]: (root) CMD (/usr/lib/sa/sa1 1 1)
Feb 9 07:40:01 tonykorn97 crond[1448]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Feb 9 07:45:01 tonykorn97 crond[1451]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Feb 9 07:50:01 tonykorn97 crond[1454]: (root) CMD (/usr/lib/sa/sa1 1 1)
Feb 9 07:50:01 tonykorn97 crond[1455]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
Feb 9 07:55:01 tonykorn97 crond[1459]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok)
修改/etc/crontab檔案
#01 * * * * root run-parts /etc/cron.hourly
#02 4 * * * root run-parts /etc/cron.daily
#22 4 * * 0 root run-parts /etc/cron.weekly
#42 4 1 * * root run-parts /etc/cron.monthly
重新啟動crond服務
[root@tonykorn97 etc]# /etc/init.d/crond status
crond is stopped
[root@tonykorn97 etc]# /etc/init.d/crond start
Starting crond: [ OK ]
[root@tonykorn97 etc]# /etc/init.d/crond status
crond (pid 7358) is running...
[root@tonykorn97 etc]#
檢視還是有這樣的資訊:
在/etc/cron.d目錄下面可以看到下面的資訊:
[root@tonykorn97 cron.d]# ls -al
total 40
drwxr-xr-x 2 root root 4096 Feb 12 14:16 .
drwxr-xr-x 82 root root 12288 Feb 12 12:40 ..
-rw-r--r-- 1 root root 123 Aug 17 2004 mrtg
-rw-r--r-- 1 root root 188 Feb 1 2006 sysstat
[root@tonykorn97 cron.d]# cat sysstat
# run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib/sa/sa1 1 1
# generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib/sa/sa2 -A
[root@tonykorn97 cron.d]# cat mrtg
*/5 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
[root@tonykorn97 cron.d]#
禁止執行這些命令。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/312079/viewspace-245612/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux Log中大量 crond(pam_unix)[10094]: session opened for user root by (uid=0)LinuxSessionUI
- 【RAC安裝故障】multiple user has uid 0UI
- su - root could not open sessionSession
- win10更新介面只顯示0%怎麼解決|win10更新一直卡在0%的解決方法Win10
- 限制End User Session數量Session
- Maximum No. Of SAP Session Per UserSession
- 記一次vmware15的ubuntu18.04desktop版啟動異常Stopped User Manager for UID 121;Started Session c** of user gdm.UbuntuUISession
- 華碩筆記本電池0%充不進電怎麼辦 華碩筆記本充不進電一直顯示0%筆記
- webstorm 底部一直在閃爍顯示indexingWebORMIndex
- ubuntu mysql Access denied for user root@localhostUbuntuMySqllocalhost
- Access denied for user 'root'@'localhost' (using password: NO)localhost
- 解決mysql“Access denied for user 'root'@'localhost'”MySqllocalhost
- databinding view is not a binding layout root 以及不顯示的坑View
- profile限制user連線session數Session
- Homestead 環境安裝 horizon 一直顯示失敗
- sqlserver2008一直顯示正在還原.SQLServer
- 《一直顯示正在準備Windows,重啟也沒有用》Windows
- Web 伺服器顯示 no input file specifiedWeb伺服器
- Connection to host as user root failed.ERROR: NMO not setuid-root (Unix-only)AIErrorUI
- Access denied for user ‘root‘@‘localhost‘問題的解決localhost
- ERROR 1045 (28000): Access denied for user 'root'@'localhost'Errorlocalhost
- Error 1045(28000) Access Denied for user 'root'@'localhost'Errorlocalhost
- #1045 - Access denied for user 'root'@'localhost' (using password: NO)localhost
- 獨顯接顯示器報錯提示:Mouse0: cannot open input devicedev
- 碰見一個BLOCKING_SESSION顯示不正確的BUGBloCSession
- 華納雲:sql server一直顯示正在還原怎麼解決SQLServer
- QDockWidget 在QMainWindow中一直顯示的問題解決方案AI
- 收藏 不顯示刪除回覆顯示所有回覆顯示星級回覆顯示得分回覆 動態網站部署到伺服器出現了問題網站伺服器
- 10202 event並不顯示index scan的root block讀IndexBloC
- 限制End User Session數量 【Blog 搬家】Session
- 伺服器上訪問正常顯示網頁,遠端的時候“無法顯示”伺服器網頁
- 永久開啟user版本adb root許可權
- mysql 1045, "Access denied for user 'root'@'localhost' (using password: NO)"MySqllocalhost
- Mysql 5.7 CentOS Access denied for user 'root'@'localhost'解決方式MySqlCentOSlocalhost
- The user specified as a definer ('wx_root'@'%') does not exist 解決方案
- Mysql:ERROR 1045 (28000): Access denied for user 'root'@'localhost'MySqlErrorlocalhost
- mysql can't connect error about privilege----not root userMySqlError
- 解決mysql"Access denied fot user 'root'@'localhost'"問題MySqllocalhost