Skip to content

Commit 17cdb0f

Browse files
Merge branch 'main' into user/mavel/whatsnew
2 parents 2c87173 + 15426a5 commit 17cdb0f

File tree

3 files changed

+56
-42
lines changed

3 files changed

+56
-42
lines changed

defender-endpoint/schedule-antivirus-scan-anacron.md

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: Schedule an antivirus scan using Anacron in Microsoft Defender for Endpoint on Linux
2+
title: Schedule an antivirus scan using Anacron with Microsoft Defender for Endpoint on Linux
33
description: Learn how to schedule an antivirus scan in Microsoft Defender for Endpoint on Linux for better protection of your organization's assets.
44
ms.service: defender-endpoint
55
ms.author: deniseb
66
author: denisebmsft
77
ms.localizationpriority: medium
8-
ms.date: 12/02/2023
8+
ms.date: 03/24/2025
99
manager: deniseb
1010
audience: ITPro
1111
ms.collection:
@@ -17,18 +17,15 @@ ms.subservice: linux
1717
search.appverid: met150
1818
---
1919

20-
# Schedule an antivirus scan using Anacron in Microsoft Defender for Endpoint on Linux
20+
# Schedule an antivirus scan using Anacron with Microsoft Defender for Endpoint on Linux
2121

2222
**Applies to:**
2323

2424
- Microsoft Defender for Endpoint for servers
2525
- Microsoft Defender for Servers Plan 1 or Plan 2
2626
- Microsoft Defender Antivirus
2727

28-
To run a scan of Microsoft Defender Antivirus for Linux, see [Supported Commands](linux-resources.md#supported-commands).
29-
30-
> [!NOTE]
31-
> This article supports Microsoft Defender for Endpoint on Linux for Red Hat Enterprise Linux distributions (RHEL).
28+
To run a scan of Microsoft Defender Antivirus for Linux, see [Supported commands](linux-resources.md#supported-commands).
3229

3330
## System requirements
3431

@@ -37,23 +34,27 @@ See the following system requirements needed to schedule Microsoft Defender Anti
3734
- Linux distributions and versions: Red Hat Enterprise Linux 7.2 or higher.
3835
- The **FANOTIFY** option in kernel must be enabled.
3936

37+
Also see [Prerequisites for Microsoft Defender for Endpoint on Linux](mde-linux-prerequisites.md).
38+
4039
## Scheduling Microsoft Defender Antivirus scan in Red Hat Linux
4140

42-
You can schedule cron jobs to initiate Microsoft Defender Antivirus scans on a schedule. For more information, see [How to schedule scans with Microsoft Defender for Endpoint on Linux](schedule-antivirus-scan-crontab.md). This process works well if the device is always up and running.
41+
You can [schedule cron jobs to initiate Microsoft Defender Antivirus scans on a schedule](schedule-antivirus-scan-crontab.md). This process works well if the device is always up and running.
4342

44-
But if the Linux devices are shut down or offline during the cron schedule, the scan won't run. In these situations, you can use **anacron** to read the timestamp and find the last executed job. If the device was shut down during the scheduled cron job, it needs to wait until the next scheduled time. By using **anacron**, the system will detect the last time the scan was run. If the device didn't run the cron job, it will automatically start it.
43+
But if the Linux devices are shut down or offline during the cron schedule, scans don't run. In these situations, you can use **anacron** to read the timestamp and find the last executed job. If the device was shut down during the scheduled cron job, it needs to wait until the next scheduled time. By using **anacron**, the system will detect the last time the scan was run. If the device didn't run the cron job, it will automatically start it.
4544

4645
### Schedule Microsoft Defender Antivirus scans in Red Hat Linux
4746

4847
Use the following steps to schedule scans:
4948

5049
1. Connect to the RedHat server using PuTTY.
51-
1. Edit the anacron file:
50+
51+
2. Edit the anacron file as follows:
52+
5253
```shell
5354
vi /etc/anacron
5455
```
5556

56-
1. :::image type="content" source="media/vi-etc-anacron.png" alt-text="Sample Anacron Job Linux." lightbox="media/vi-etc-anacron.png" link="media/vi-etc-anacron.png":::
57+
3. Review and edit your Anacron file, which contains the following information:
5758

5859
```shell
5960
# /etc/anacrontab: configuration file for anacron
@@ -66,19 +67,24 @@ Use the following steps to schedule scans:
6667
# delay will be 5 minutes + RANDOM_DELAY for cron.daily
6768
```
6869

69-
1. Note the following items in the file.
70-
1. **Shell:** Shell is referred as `/bin/sh`, and not as `/bin/bash`. Remember when writing the jobs.
71-
1. **RANDOM_DELAY:** Describes the maximum time in minutes for the job. This value is used to offset the jobs so there wouldn't be too many jobs running at the same time. Using this delay is ideal for VDI solutions.
72-
1. **START_HOURS_RANGE:** Describes the time range to run the job.
73-
1. **cron.daily:** Describes 1 as the period of days required for the frequency of job executions. 5 is the delay in minutes that anacron waits after the device restarts.
70+
Notice the following items in the file:
71+
72+
- **Shell** is referred as `/bin/sh`, and not as `/bin/bash`. Remember this when you're configuring jobs.
73+
- **RANDOM_DELAY** describes the maximum time in minutes for the job. This value is used to offset the jobs so there aren't too many jobs running at the same time. Using this delay is ideal for VDI solutions.
74+
- **START_HOURS_RANGE** describes the time range to run the job.
75+
- **cron.daily** describes `1` as the period of days required for the frequency of job executions. `5 is the delay in minutes that anacron waits after the device restarts.
7476

75-
1. Review look at the anacron jobs:
77+
4. Review your anacron jobs by using the following command:
7678

7779
```shell
7880
ls -lh /etc/cron*
7981
```
8082

81-
:::image type="content" source="media/vi-etc-anacron.png" alt-text="Sample Anacron Job Linux." lightbox="media/vi-etc-anacron.png" link="media/vi-etc-anacron.png":::
83+
You should see information similar to what's shown in the following screenshot:
84+
85+
:::image type="content" source="media/vi-etc-anacron.png" alt-text="Sample Anacron Job Linux." lightbox="media/vi-etc-anacron.png" link="media/vi-etc-anacron.png":::
86+
87+
The following code example provides a more detailed view:
8288

8389
```shell
8490
[root@redhat7 /] # ls -lh /etc/cron*
@@ -117,9 +123,9 @@ Use the following steps to schedule scans:
117123
total 0
118124
```
119125

120-
1. Ignore the `/etc/cron.d` directory, you will see `/etc/cron.daily, hourly, monthly, and weekly`.
126+
Ignore the `/etc/cron.d` directory; instead, review `/etc/cron.daily, hourly, monthly, and weekly`.
121127

122-
1. To schedule a weekly antivirus scan, you can create a file (Job) under the ```/etc/cron.weekly``` directory.
128+
5. To schedule a weekly antivirus scan, you can create a file (Job) under the ```/etc/cron.weekly``` directory.
123129

124130
```shell
125131
cd /etc/cron.weekly
@@ -145,7 +151,7 @@ Use the following steps to schedule scans:
145151
Type: wq!
146152
```
147153

148-
1. Change the file permissions to allow the file to be executed.
154+
6. Change the file permissions to allow the file to be executed by using this command:
149155

150156
```shell
151157
Chmod 755 mdavfullscan
@@ -168,13 +174,13 @@ Use the following steps to schedule scans:
168174
[root@redhat7 cron.weekly] #
169175
```
170176

171-
1. Use the command to test the weekly anacron job.
177+
7. Use the following command to test the weekly anacron job:
172178

173179
```shell
174180
./mdavfullscan
175181
```
176182

177-
1. Use the command to verify the job ran successfully.
183+
8. Use the following command to verify the job ran successfully:
178184

179185
```shell
180186
cat /logs/mdav_avacron_full_scan.log
@@ -192,5 +198,10 @@ Use the following steps to schedule scans:
192198
[root@redhat7 cron.weekly] #
193199
```
194200

195-
[!INCLUDE [Microsoft Defender for Endpoint Tech Community](../includes/defender-mde-techcommunity.md)]
201+
## See also
196202

203+
- [Microsoft Defender for Endpoint on Linux](microsoft-defender-endpoint-linux.md)
204+
- [Prerequisites for Microsoft Defender for Endpoint on Linux](mde-linux-prerequisites.md)
205+
- [Configure security settings and policies for Microsoft Defender for Endpoint on Linux](linux-preferences.md)
206+
207+
[!INCLUDE [Microsoft Defender for Endpoint Tech Community](../includes/defender-mde-techcommunity.md)]

defender-endpoint/schedule-antivirus-scan-crontab.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: How to schedule scans with Microsoft Defender for Endpoint (Linux)
2+
title: Schedule an antivirus scan using crontab with Microsoft Defender for Endpoint on Linux
33
description: Learn how to schedule an automatic scanning time for Microsoft Defender for Endpoint (Linux) to better protect your organization's assets.
44
ms.service: defender-endpoint
55
ms.author: deniseb
@@ -15,17 +15,17 @@ ms.collection:
1515
ms.topic: conceptual
1616
ms.subservice: linux
1717
search.appverid: met150
18-
ms.date: 10/11/2024
18+
ms.date: 03/24/2025
1919
---
2020

21-
# Schedule scans with Microsoft Defender for Endpoint (Linux)
21+
# Schedule an antivirus scan using crontab with Microsoft Defender for Endpoint on Linux
2222

2323
**Applies to:**
2424

2525
- Microsoft Defender for Endpoint for servers
2626
- Microsoft Defender for Servers Plan 1 or Plan 2
2727

28-
To run a scan for Linux, see [Supported Commands](linux-resources.md#supported-commands).
28+
To run a scan for Linux, see [Supported commands](linux-resources.md#supported-commands).
2929

3030
For Linux (and Unix), you can use a tool called **crontab** (similar to Task Scheduler in Windows) to run scheduled tasks.
3131

@@ -41,9 +41,9 @@ For Linux (and Unix), you can use a tool called **crontab** (similar to Task Sch
4141
> - `America/Chicago`
4242
> - `America/Denver`
4343
44-
## To set the Cron job
44+
## Set the Cron job
4545

46-
Use the following commands:
46+
To set the cron job, use the commands in this article.
4747

4848
### Backup crontab entries
4949

@@ -72,9 +72,7 @@ You might see:
7272
0 * * * * /etc/opt/microsoft/mdatp/logrorate.sh
7373
```
7474

75-
Press "Insert"
76-
77-
Add the following entries:
75+
Press **Insert**, and then add the following entries:
7876

7977
```bash
8078
CRON_TZ=America/Los_Angeles
@@ -85,9 +83,7 @@ CRON_TZ=America/Los_Angeles
8583
> [!NOTE]
8684
> In this example, we have set it to 00 minutes, 2 a.m. (hour in 24 hour format), any day of the month, any month, on Saturdays. Meaning it will run Saturdays at 2:00 a.m. Pacific (UTC -8).
8785
88-
Press "Esc"
89-
90-
Type "`:wq`" without the double quotes.
86+
Press **Esc**, and then type "`:wq`" without the double quotes.
9187

9288
> [!NOTE]
9389
> w == write, q == quit
@@ -134,7 +130,7 @@ For more information, see [Chef documentation](https://docs.chef.io/resources/cr
134130
Resource Type: cron
135131
```
136132

137-
See <https://puppet.com/docs/puppet/5.5/types/cron.html> for more information.
133+
For more information, see [Puppet documentation: Resource Type: cron](https://puppet.com/docs/puppet/5.5/types/cron.html).
138134

139135
**Automating with Puppet: Cron jobs and scheduled tasks**
140136

@@ -231,4 +227,11 @@ crontab -u username -r
231227
| | | | +—- day of week (values: 0 - 6) (Sunday=0 or 7) (special characters: , \- \* / L W C) <br>
232228
| | | | |*****command to be executed
233229
```
230+
231+
## See also
232+
233+
- [Microsoft Defender for Endpoint on Linux](microsoft-defender-endpoint-linux.md)
234+
- [Prerequisites for Microsoft Defender for Endpoint on Linux](mde-linux-prerequisites.md)
235+
- [Configure security settings and policies for Microsoft Defender for Endpoint on Linux](linux-preferences.md)
236+
234237
[!INCLUDE [Microsoft Defender for Endpoint Tech Community](../includes/defender-mde-techcommunity.md)]

defender-office-365/preset-security-policies.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.custom:
1616
description: Admins can learn how to apply Standard and Strict policy settings across the protection features of Exchange Online Protection (EOP) and Microsoft Defender for Office 365
1717
ms.service: defender-office-365
1818
search.appverid: met150
19-
ms.date: 03/21/2025
19+
ms.date: 03/24/2025
2020
appliesto:
2121
- ✅ <a href="https://learn.microsoft.com/defender-office-365/eop-about" target="_blank">Exchange Online Protection</a>
2222
- ✅ <a href="https://learn.microsoft.com/defender-office-365/mdo-about#defender-for-office-365-plan-1-vs-plan-2-cheat-sheet" target="_blank">Microsoft Defender for Office 365 Plan 1 and Plan 2</a>
@@ -33,9 +33,9 @@ Depending on your organization, preset security policies provide many of the pro
3333

3434
The following preset security policies are available:
3535

36-
- **Standard** preset security policy
37-
- **Strict** preset security policy
38-
- **Built-in protection** preset security policy (default policies for Safe Attachments and Safe Links protection in Defender for Office 365)
36+
- **Standard** preset security policy.
37+
- **Strict** preset security policy.
38+
- **Built-in protection** preset security policy (default policies for Safe Attachments and Safe Links protection in Defender for Office 365; applied to all users who aren't specifically excluded, or who aren't included in the **Standard** or **Strict** preset security policies, or in custom Safe Attachments or Safe Links policies).
3939

4040
For details about these preset security policies, see the [Appendix](#appendix) section at the end of this article.
4141

@@ -190,7 +190,7 @@ To disable the **Standard protection** or **Strict protection** preset security
190190
> [!TIP]
191191
> The **Built-in protection** preset security policy is applied to all users in organizations with any amount of licenses for Defender for Office 365. Application of this protection is in the spirit of securing the broadest set of users until admins specifically configure Defender for Office 365 protections. Because **Built-in protection** is enabled by default, customers don't need to worry about violating product licensing terms. However, we recommend purchasing enough Defender for Office 365 licenses to ensure **Built-in protection** continues for all users.
192192
>
193-
> The **Built-in protection** preset security policy doesn't affect recipients who are defined in the **Standard** or **Strict** preset security policies, or in custom Safe Links or Safe Attachments policies. Therefore, we typically don't recommend exceptions to the **Built-in protection** preset security policy, unless you want to exclude users who aren't eligible for Safe Links and Safe Attachments protections (users who lack Defender for Office 365 licenses).
193+
> <u>The **Built-in protection** preset security policy doesn't affect recipients who are defined in the **Standard** or **Strict** preset security policies, or in custom Safe Links or Safe Attachments policies</u>. Therefore, we typically don't recommend exceptions to the **Built-in protection** preset security policy, unless you want to exclude users who aren't eligible for Safe Links and Safe Attachments protections (users who lack Defender for Office 365 licenses).
194194
195195
1. In the Microsoft Defender portal at <https://security.microsoft.com>, go to **Email & Collaboration** \> **Policies & Rules** \> **Threat policies** \> **Preset Security Policies** in the **Templated policies** section. Or, to go directly to the **Preset security policies** page, use <https://security.microsoft.com/presetSecurityPolicies>.
196196

0 commit comments

Comments
 (0)