Skip to content

Commit f6721dc

Browse files
committed
Linux discovery command update
1 parent 74b6952 commit f6721dc

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

articles/migrate/tutorial-discover-physical.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: Vikram1988
55
ms.author: vibansa
66
ms.manager: abhemraj
77
ms.topic: tutorial
8-
ms.date: 04/05/2024
8+
ms.date: 06/12/2024
99
ms.service: azure-migrate
1010
ms.custom: mvc, subject-rbac-steps, engagement-fy24, linux-related-content
1111
#Customer intent: As a server admin I want to discover my on-premises server inventory.
@@ -116,17 +116,24 @@ For Linux servers, you can create a user account in one of two ways:
116116
> [!Note]
117117
> If you want to perform software inventory (discovery of installed applications) and enable agentless dependency analysis on Linux servers, it recommended to use Option 1.
118118
119-
### Option 2
120-
- If you can't provide user account with sudo access, then you can set 'isSudo' registry key to value '0' in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AzureAppliance registry on the appliance server and provide a non-root account with the required capabilities using the following commands:
119+
### Option 2: Discover using non-sudo user account
120+
- If you can't provide user account with sudo access, then you can set 'isSudo' registry key to value '0' in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AzureAppliance registry on the appliance server.
121+
- Provide a non-sudo user account with the required capabilities.
122+
- Sign in as root user. Create a non-sudo user account by running the `sudo useradd <account-name>` command. Set a password for the non-sudo user account using the `sudo passwd <account-name>` command.
123+
- Add the non-sudo user account to the wheel group using this command: `sudo usermod –aG wheel <account-name>`. Users in this group have permissions to run setcap commands as detailed below.
124+
- Sign in to the non-sudo user account that was created and run the following commands:
121125

122126
**Command** | **Purpose**
123127
--- | --- |
124-
setcap CAP_DAC_READ_SEARCH+eip /usr/sbin/fdisk <br></br> setcap CAP_DAC_READ_SEARCH+eip /sbin/fdisk _(if /usr/sbin/fdisk is not present)_ | To collect disk configuration data
125-
setcap "cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_setuid,<br> cap_setpcap,cap_net_bind_service,cap_net_admin,cap_sys_chroot,cap_sys_admin,<br> cap_sys_resource,cap_audit_control,cap_setfcap=+eip" /sbin/lvm | To collect disk performance data
126-
setcap CAP_DAC_READ_SEARCH+eip /usr/sbin/dmidecode | To collect BIOS serial number
127-
chmod a+r /sys/class/dmi/id/product_uuid | To collect BIOS GUID
128-
129-
- To perform agentless dependency analysis on the server, ensure that you also set the required permissions on /bin/netstat and /bin/ls files by using the following commands:<br /><code>sudo setcap CAP_DAC_READ_SEARCH,CAP_SYS_PTRACE=ep /bin/ls<br /> sudo setcap CAP_DAC_READ_SEARCH,CAP_SYS_PTRACE=ep /bin/netstat</code>
128+
setcap CAP_DAC_READ_SEARCH+eip /usr/sbin/fdisk <br></br> setcap CAP_DAC_READ_SEARCH+eip /sbin/fdisk _(if /usr/sbin/fdisk is not present)_ | To collect disk configuration data.
129+
setcap "cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_setuid,cap_setpcap,cap_net_bind_service,cap_net_admin,cap_sys_chroot,cap_sys_admin,<br> cap_sys_resource,cap_audit_control,cap_setfcap=+eip" /sbin/lvm | To collect disk performance data.
130+
setcap CAP_DAC_READ_SEARCH+eip /usr/sbin/dmidecode | To collect BIOS serial number.
131+
chmod a+r /sys/class/dmi/id/product_uuid | To collect BIOS GUID.
132+
sudo setcap CAP_DAC_READ_SEARCH,CAP_SYS_PTRACE=ep /bin/ls<br /> sudo setcap CAP_DAC_READ_SEARCH,CAP_SYS_PTRACE=ep /bin/netstat | To perform agentless dependency analysis on the server, set the required permissions on /bin/netstat and /bin/ls files.
133+
134+
- Running all the above commands will prompt for a password. Enter the password of the non-sudo user account for each prompt.
135+
- Add the credentials of the non-sudo user account to the Azure Migrate appliance.
136+
- The non-sudo user account will execute the commands listed [here](discovered-metadata.md#linux-server-metadata) periodically.
130137

131138
### Create an account to access servers
132139

0 commit comments

Comments
 (0)