{"id":30,"date":"2008-01-26T22:02:54","date_gmt":"2008-01-26T21:02:54","guid":{"rendered":"http:\/\/www.chipwreck.de\/blog\/2008\/01\/28\/fast-user-switching-via-commandline\/"},"modified":"2016-12-31T02:06:30","modified_gmt":"2016-12-31T01:06:30","slug":"fast-user-switching-via-commandline","status":"publish","type":"post","link":"https:\/\/www.chipwreck.de\/blog\/2008\/01\/26\/fast-user-switching-via-commandline\/","title":{"rendered":"Fast user switching via commandline"},"content":{"rendered":"<p>This is quite an undocumented feature, here is how it works: <\/p>\n<p>Show login screen (without logging out):<\/p>\n<pre lang=\"bash\">\r\n#!\/bin\/bash\r\n# Show the login screen (without logging out)\r\n#\r\n# From: www.chipwreck.de\r\n\r\n\/System\/Library\/CoreServices\/Menu\\ Extras\/User.menu\/Contents\/Resources\/CGSession -suspend\r\n<\/pre>\n<p>Switch current user (replace 501 with the correct UID): <\/p>\n<pre lang=\"bash\">\r\n#!\/bin\/bash\r\n# Switch to another user without logging out - replace 501 with the uid of the user you switch to\r\n#\r\n# From: www.chipwreck.de\r\n\r\n\/System\/Library\/CoreServices\/Menu\\ Extras\/User.menu\/Contents\/Resources\/CGSession -switchToUserID 501\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This is quite an undocumented feature, here is how it works: Show login screen (without logging out): #!\/bin\/bash # Show the login screen (without logging out) # # From: www.chipwreck.de \/System\/Library\/CoreServices\/Menu\\ Extras\/User.menu\/Contents\/Resources\/CGSession -suspend Switch current user (replace 501 with the correct UID): #!\/bin\/bash # Switch to another user without logging out &#8211; replace 501 with &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.chipwreck.de\/blog\/2008\/01\/26\/fast-user-switching-via-commandline\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Fast user switching via commandline&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[78,7],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-osx","tag-osx","tag-shell"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paPEN-u","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":0,"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}