-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails over ssh #507
Comments
Hi, I have the same problem. Does anybody have a solution? Thanks |
Are you running as the same macOS user as the person who uses each computer? See the difference in output between running the following 2 commands on the same machine:
The former is your current user so should output your installed MAS applications, the latter is root so should output |
@rgoldberg, thanks for this! Indeed — I am sshing under an admin account into my family members' machines to do updates. My family members have their own user accounts on their machines. However, if inside this ssh session I do $ su user
$ mas list I still get the same However, if I do the same locally (open the terminal under my family member's user session and do $ su admin
$ mas list I get the list of all the installed apps. So, locally, mas works under both users and remotely it doesn't work under any user :) |
Can you try I'm not well versed about macOS multiple user / admin account behavior in general or specifically for MAS applications. I don't have any macs to SSH into. I don't want to create extra users or start an SSH server on my machine as I'm trying to keep it clean. Sorry. |
@rgoldberg, sure: Locally
|
From what I remember from seeing some of the relevant code a while ago: I think the list of installed apps is populated by some undocumented CommerceKit code. It's later filtered to ensure the apps are actually in I guess that CommerceKit relies on some services or permissions that just aren't started or enabled when a user sshes in as opposed to logging in with a full gui desktop. I don't, however, know for sure, so I'll investigate in a little while when I have some time. Maybe you could manually start /enable such hypothetical services / permissions from your ssh login; you could either research the topic or try to find services from your gui logins that aren't running in your ssh logins. |
@rgoldberg, thanks! I can report that the |
Thanks for the confirmation that |
@GentleHoneyLover I tried to step into the source of the installed software list Maybe you can get Xcode to step into the function (I normally don't program for Mac platforms or use Xcode, so I'm not amazingly conversant with any of it). Since If you can't find services / permissions to enable or another workaround, you could try using Apple Remote Desktop to remotely log in to the machines. I'd imagine that |
@GentleHoneyLover Does the info from the following comment help? |
Your Environment
mas version
: 1.8.6system_profiler SPSoftwareDataType -detailLevel mini
): macOS 14.2.1 (23C71)mas Install Method
brew install mas
(homebrew-core)Describe the Bug
I'm using mas on all of the machines in my household. I manage my family member's machines by ssh-ing into them and running
mas list
andmas upgrade
to install updates. Everything works fine when I run mas commands locally. However, when run the same commands via an ssh session I get completely different output.mas list
run locally outputs:mas list
run via ssh on the same machine outputs:No installed apps found
Obviously, I cannot install MAS updates via ssh...
To Reproduce
Steps to reproduce the behavior:
mas list
locallymas list
via an ssh sessionExpected Behavior
mas list
andmas upgrade
work the same way regardless of whether run locally or via sshThe text was updated successfully, but these errors were encountered: