mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-02 19:26:56 -05:00
Deployment issues for RustDesk desktop on Mac #3220
Labels
No labels
bug
documentation
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
question
unreproducible
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rustdesk-rustdesk#3220
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jelockwood on GitHub (Jan 7, 2025).
Bug Description
We are currently testing RustDesk desktop with the OSS server. We have successfully built/configured the server and have successfully manually configured RustDesk desktop on Mac to connect to a Windows machine and vice versa.
However our ultimate goal is to then deploy the RustDesk desktop client to all our Macs and to automate this as much as possible. Like many organisations we do not want to give our users local admin privileges on their (Mac) computers.
In testing this I have therefore observed problems which make it difficult to impossible to automate mass deployment. See further notes in the 'How to Reproduce' section.
How to Reproduce
First testing using a local non-admin level user account. I ran the provided example macOS deployment bash script as listed at https://rustdesk.com/docs/en/self-host/client-deployment/ and inserted the correct valid value for the rustdesk_cfg
Attempt 1
Result1
It asks for a password
sudo: a password is requiredThis corresponds to line 12 of the provided script which reads -
[ "$UID" -eq 0 ] || exec sudo bash "$0" "$@"If the user types their own password it will still fail as they are not a 'sudoer'
Note: Even if one ignores the above issue I would expect a non-admin user would then get a subsequent failure as they would not have the required permission to allow the script to copy the RustDesk.app from the downloaded and mounted disk image to the /Applications folder.
Attempt2
Result2
It asks for a password
sudo: a password is requiredThis corresponds to line 12 of the provided script which reads -
[ "$UID" -eq 0 ] || exec sudo bash "$0" "$@"If one enters the users password it accepts it because this time they are a valid sudoer
It then downloads via curl the disk image
mounts it
copies the RuskDesk.app to the Applications folder
launches the app
if however I then check the settings in the app by clicking on the three dots next to the ID line on the left of the window, then click on Network, unlock network settings and then click on ID/Relay server - I find the settings are empty.
Investigation reveals the cause is that because as a fresh setup the folder containing the preferences for RustDesk is created and owned by root and NOT accessible by the user
Workaround2
executing
sudo chown -R tempadmin ~/Library/Preferences/com.carrier.RustDeskand then relaunching the RustDesk app and going to the same settings screen reveals this has allowed the app to read the settings correctly
Attempt3
Result3
Identical to Result2 - the preference folder is created and owned by root and hence cannot be accessed when the user runs the app
Attempt4
mkdir ~/Library/Preferences/com.carriez.Rustdeskfirst to pre-create the folder as the user not rootResult4
The disk image is downloaded the app is copied to the /Applications folder, the preferences are imported but this time because the folder has the right permission the app can successfully read them.
Workaround4
Based on Attempt4 inserting the following line in to the script between lines 12 and 13 should help
Expected Behavior
The provided script should result in the preferences folder being created with the correct ownership to allow the successful installation and importing of the settings. It clearly does not.
Furthermore the deployment process should NOT require the user to be an admin level user as this is contrary to typical security practises.
Operating system(s) on local (controlling) side and remote (controlled) side
macOS Sequoia 15.2
RustDesk Version(s) on local (controlling) side and remote (controlled) side
1.3.6 -> 1.3.6
Screenshots
Not applicable
Additional Context
However whilst the above fully details the problem and a successful workaround as detailed in attempt4 I would say that there are clearly a bigger issues.
However my ideal goal would be as follows.
As far as I can see it is impossible to use the provided script as a non-admin user even if one pre-creates the preference folder.
You may want to look at the following code snippet which might help you make a script which can do operations both as 'root' and as the user currently logged in to the Mac.
@rustdesk commented on GitHub (Jan 7, 2025):
#763