Benches macOS

4

set VNC access password from command line

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I've got a headless Mac server running 10.4.something. I had a monitor attached to it for long enough to enable ssh and vnc access, and I was administering it through vnc from one of my other computers. That computer recently suffered a hard disk crash and I realized I don't remember the vnc access password.

However, I do know the password to log in as an admin user via ssh. That should be enough to do almost anything, right? Is there a way to change the vnc access password from the command line?

4 replies

Sign in or join Beachball Help to reply.

  1. 0

    BDAqua

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Stephen, see if these help...

    http://www.gigoblog.com/2008/04/08/set-up-screen-sharing-vnc-via-command-line-on -mac-os-x-remotely-using-ssh/

    http://www.macgeekery.com/tips/cli/settingremote_desktops_vnc_password_interminal

    http://www.siafoo.net/snippet/339

  2. 0

    Stephen Bloch

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    OK, I've run kickstart with every combination of options I can think of, starting with

    kickstart -activate -configure -access -on -privs -all -restart -agent

    Chicken of the VNC says "Please configure Apple Remote Desktop to allow VNC Viewers to control the screen. Unknown authType 30"

    So I set up VNC access with a known password on another computer, and confirmed that it worked. (What happens when you VNC into the computer you're already on? Do you remember that scene in "Being John Malkevitch" in which John Malkevitch himself goes through the tunnel?) I then copied the /Library/Preferences/com.apple.VNCSettings.txt file from this known computer to the target computer, tried Chicken again, and got the exact same message.

    So I deleted the aforementioned file on the target machine, figuring that would take me back to some sort of factory default settings. Chicken -> same message.

    kickstart -configure -vncpw <contents of VNCSettings.txt file here> -restart -agent

    Chicken -> same message.

  3. 0

    Stephen Bloch

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Correction: I'm in. The missing piece of incantation was

    -configure -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw hexgibberishgoeshere

    from the linked macgeekery post. Thanks!

  4. 0

    BDAqua

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Good work, thanks for the report! 🙂