伺服器一直顯示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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 記一次vmware15的ubuntu18.04desktop版啟動異常Stopped User Manager for UID 121;Started Session c** of user gdm.UbuntuUISession
- ubuntu mysql Access denied for user root@localhostUbuntuMySqllocalhost
- 【git】No user exists for uid 1000 fatal: 無法讀取遠端倉庫。GitUI
- mysql 1045, "Access denied for user 'root'@'localhost' (using password: NO)"MySqllocalhost
- uniq(uid) distinct uidUI
- Access denied for user ‘root‘@‘localhost‘問題的解決localhost
- 永久開啟user版本adb root許可權
- already opened by ClassLoader
- GPU顯示卡伺服器GPU伺服器
- webstorm 底部一直在閃爍顯示indexingWebORMIndex
- [20201103]lsof顯示link=0的檔案.txt
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:YES)Errorlocalhost
- 華碩筆記本電池0%充不進電怎麼辦 華碩筆記本充不進電一直顯示0%筆記
- 碰見一個BLOCKING_SESSION顯示不正確的BUGBloCSession
- Homestead 環境安裝 horizon 一直顯示失敗
- 顯示卡伺服器的用途伺服器
- 啟動報錯:Access denied for user 'root'@'localhost' (using password:YES)localhost
- Ubuntu18.04:mysql:ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘UbuntuMySqlErrorlocalhost
- 報錯”ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)”Errorlocalhost
- java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)JavaSQLExceptionlocalhost
- 解決Flutter編譯一直顯示Running Gradle task 'assembleDebug'Flutter編譯Gradle
- win10怎麼一直使用獨立顯示卡_win10雙顯示卡如何設定只使用獨立顯示卡Win10
- Web 伺服器顯示 no input file specifiedWeb伺服器
- Jenkins 節點已啟動,但是一直顯示未線上?Jenkins
- GPU顯示卡伺服器有哪些用途GPU伺服器
- 本地顯示Linux伺服器的GUI程式Linux伺服器GUI
- Linux錯誤 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)LinuxErrorlocalhost
- VS2010 Opened in another editor
- SAP ALV小數點後面如果為0不顯示
- 顯示卡伺服器現在普遍應用伺服器
- GPU顯示卡伺服器的用途有哪些GPU伺服器
- 解決Mysql:ERROR 1045 (28000):Access denied for user ‘root‘@‘localhost‘ (using password: NO)的方法MySqlErrorlocalhost
- 安裝kernel...src.rpm錯誤:warning: user mockbuild does not exist - using rootMockUI
- SpringBoot中yml配置java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: NOSpring BootJavaSQLExceptionlocalhost
- 華納雲:sql server一直顯示正在還原怎麼解決SQLServer
- 解決win10控制皮膚一直顯示空白的最佳方法Win10
- 顯示卡驅動安裝失敗怎麼辦 nvidia顯示卡驅動一直無法安裝怎麼解決
- win10讀取行動硬碟一直顯示掃描如何修復Win10硬碟
- MySQL 8.0.13 密碼問題 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)MySql密碼Errorlocalhost