ok, here’s what is truly suspicious is in there: “/etc/cron.daily/shadow…
- User
ok, here’s what is truly suspicious is in there: “/etc/cron.daily/shadow /etc/cron.daily/makewhatis” - “#!/bin/sh
Verify integrity of password and group files
/usr/sbin/pwck -r /usr/sbin/grpck -r” - “#!/bin/sh exec makewhatis -Tutf8 ” “/etc/cron.hourly/0anacron” - "#!/bin/sh
Check whether 0anacron was run today already
if test -r /var/spool/anacron/cron.daily; then day=cat /var/spool/anacron/cron.daily fi if [ date +%Y%m%d = “day" ]; then exit 0 fi
Do not run jobs when on battery power
online=1 for psupply in /sys/class/power_supply/* ; do if [
cat " psupply/type” 2>/dev/nullx = Mainsx ] && [ -f "$psupply/online" ]; then<br/> if [ cat “psupply/online" 2>/dev/nullx = 1x ]; then online=1 break else online=0 fi fi done if [ online = 0 ]; then exit 0 fi /usr/sbin/anacron -s”. all other dirs empty. Thank you for providing the details of the suspicious cron jobs. Let’s analyze the contents of the cron files you mentioned:- /etc/cron.daily/shadow:
- This cron file is executing the commands /usr/sbin/pwck -r and /usr/sbin/grpck -r.
- These commands verify the integrity of the password and group files on your system.
- /etc/cron.daily/makewhatis:
- This cron file has the command exec makewhatis -Tutf8.
- The makewhatis command generates the whatis database used by the man command, providing quick access to manual pages on your system.
- /etc/cron.hourly/0anacron:
- This cron file contains a script that checks if 0anacron was already run today and exits if it has.
- It also checks if the system is on battery power and exits if it is.
- Finally, it executes the /usr/sbin/anacron -s command, which performs system maintenance tasks.
From the information you’ve provided, these cron jobs seem to be normal system maintenance tasks. The /etc/cron.daily/shadow file verifies the integrity of the password and group files, while /etc/cron.daily/makewhatis updates the whatis database. The /etc/cron.hourly/0anacron file runs anacron to perform various system maintenance tasks.
Given that the rest of the directories are empty, it indicates that other scheduled tasks aren’t present in those directories.
It’s essential to regularly review the contents of cron jobs to ensure they align with the intended actions on your system. If you have any further concerns or need additional analysis, please provide more details, and I’ll be glad to assist you. but problem with multiple "agetty processes or instances still persist. I tried to fire some commands, but many isn’t working yet. If you are experiencing issues with multiple “agetty” processes or instances, here are a few steps you can take to troubleshoot the problem:
- Assistant
The duplicate commands you mentioned in each "agetty" init directory (e.g., /agetty-tty6/) seem to be related to the configuration and execution of the "agetty" process for a specific terminal (tty).
The script you provided sets the variable "tty" to the current directory name after removing the prefix (e.g., "agetty-tty6" becomes "tty6").
Then, it checks if either /sbin/getty or /bin/getty exist and sets the variable "GETTY" accordingly. If neither exists, it checks for /sbin/agetty or /bin/agetty and sets the variable accordingly.
Finally, it executes the "agetty" or "getty" command with the specified arguments, including the tty, baud rate, and terminal name.
These duplicate commands may indicate that there are multiple configurations for different terminals or specific settings for each "agetty" instance.
To further investigate the purpose and necessity of these duplicate commands, you can review the documentation or configuration files related to the specific init directories (e.g., /etc/init.d or /etc/inittab) for your system. You may also seek assistance from your system administrator or consult relevant forums and discussions specific to your Linux distribution.