microsoft / microsoft/shell-intune-samples

Intune for Linux: Root-context scripts never execute

Open
#223 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
1.1k
Forks
305
PR merge metrics
No merged PRs in 30d

Description

We’ve observed that shell scripts assigned to Linux devices via Intune and configured to run in root context do not execute, even though:

The script is correctly assigned to a group
The script is marked to run as root
The device is properly enrolled and syncing

However, in practice:

The script never runs
No logs are generated
No changes are applied
Intune portal indicates failure without any comments, or on the device nothing happens, even if the script only contains one line to write a simple log file for testing purposes. Only user-context scripts appear to execute reliably.

This behavior has been confirmed across multiple devices running Ubuntu 24.04 with the latest Intune agent (1.2508.17).

Expected Behavior
Scripts assigned to device groups and configured to run as root should.

Is root-context script execution for Linux devices officially supported, you mention e.g. using this for the example script to deploy chrome: https://github.com/microsoft/shell-intune-samples/tree/master/Linux/Apps/Google%20Chrome. I tried to deploy this without any changes according to readme, but this shows the same behaviour.

Environment

OS: Ubuntu 24.04
Intune Agent: 1.2508.17
Device is enrolled and compliant

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Linux/Apps/Google Chrome sample and its README, then reproduce the reported behavior on Ubuntu 24.04 with Intune agent 1.2508.17 using a minimal root-context script. Compare the root- and user-context execution results and device or portal logs; done means identifying whether root execution is supported and documenting a confirmed cause or reproducible limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.