[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 488
  • Last Modified:

Unix script on Mac to change Remote settings

I need a help assembling a script that activates Remote Login and Remote Management inside the File Sharing in System Preferences (on macs). I have in mind a shell scripts that runs once every day, silently in the background.

The reason for this is that I have two users that know how to change these settings and they are always turning these off which makes these macs miss the routine maintenance and updating procedures. These users claim that when this is on it disturbs their network experience. I think the reason is rather that they think their privacy is endangered or something like that. Anyway, I can't at the moment lock these changes since they have admin rights over their computers.
0
Sigurdur Armannsson
Asked:
Sigurdur Armannsson
  • 2
  • 2
1 Solution
 
ein_mann_betriebCommented:
Hi sigurarm,

If you not yet on Lion, these commands work for certain.  They are being depreciated in favor of the launchctl.


# Display whether remote login is on or off.
systemsetup -getremotelogin

# Set remote login to on
systemsetup -setremotelogin on


I will get the Remote Management piece in just a moment...
0
 
Sigurdur ArmannssonDesignerAuthor Commented:
Thanks so far. I should have mentioned the Os. It's Lion on all the macs, clients and mine too.

0
 
ein_mann_betriebCommented:
Hi again...

# Enable SSH (RemoteLogin)
/bin/launchctl load -w /System/Library/LaunchDaemons/ssh.plist

# Enable RemoteManagement
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate


These all should be 10.7 Compliant.

-Cheers, Peter.
0
 
Sigurdur ArmannssonDesignerAuthor Commented:
Looks really nice. Thanks a lot!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now