Lansweeper needs administrator rights to scan certain Linux information. If your scanning credential does not have these rights, this may result in LinuxNoSudoRights errors during Linux scanning. To give your user account sudo permissions and to resolve the LinuxNoSudoRights errors for future scans, follow the steps below. Note: be careful when editing system files, as making incorrect changes may make your system unstable.
- Start a console and enter "sudo visudo" (without quotes), enter your password when prompted.
- Use the arrow keys to scroll through the file, look for a line that looke like "username ALL=(ALL) ALL". These lines will give a user permission to use sudo. A line that looks like "%groupname ALL=(ALL) ALL" will give those permissions to all members of a group. Note the "%" before the group name. It is common to use a group called "wheel" to assign sudo rights.
- Press "i" to enter insert mode.
- Use the arrow keys to move the cursor and press Enter to insert a new line. It is not recommended to remove existing lines from the file. Instead, add "#" to the start of a line to make the system ignore that line. This way, no information can be deleted by mistake.
- When you are done editing the file, press Escape to exit insert mode.
- Type ":wq" and press Enter to save and exit the editor. To exit the editor without saving, press Escape and then press Ctrl+Z.
- If you gave sudo permissions to a group, you can view all members of that group by entering "grep username /etc/group" in the console, or enter "cat /etc/group | sort" to view all groups. For more information about this file, enter "man group" in the console. To create a new group, enter "groupadd groupname" in the console. To add a user to a group, enter "usermod -g groupname username" in the console.