Hide files, folders, volumes and user accounts


  1. One way to hide and UnHide a Volume (and most anything else):

    sudo /usr/bin/chflags hidden "/Volumes/NameOfTheVolume"
    sudo /usr/bin/chflags nohidden "/Volumes/NameOfTheVolume"

    Reload Finder to make changes realtime, or wait till next login.

    V = Hide On = drwxrwxrwx@
    v = Hide Off = drwxrwxrwx

    - Your need to have already installed the "Developer Tools" to get the app (and GetFileInfo too) called "SetFile".
    - LEOpard note: SetFile is now in a normal location, /usr/bin/


    sudo /Developer/Tools/SetFile -a V FULL-PATH-TO-VOLUME_you-want-to-hide
    sudo /Developer/Tools/SetFile -a V FULL-PATH-TO-FOLDER_you-want-to-hide
    sudo /Developer/Tools/SetFile -a V FULL-PATH-TO-FILE_you-want-to-hide

    * The next time your Finder is updated, they will vanish.
    * If you want it back, just reissue the same command with a lowercase 'v' instead.
    * VOLUMES will NOT be seen in the Terminal or displayed in Finder or "Startup Disk" Pref Pane,
    but WILL show in "Disk Utility" app.
    * FOLDERS and FILES can be seen via Terminal.

    * HIDE a Volume:
    sudo diskutil unmount /Volumes/Your-Volume-Name
    * un-HIDE a Volume:
    sudo diskutil mount /dev/disk1s3
  2. Hide a ADMIN (or any user) account from appearing on the login screen,
    set the UID to less than 500 via Netinfo Manager. Their are some minor side effects, so be careful.
    Or better yet, use HiddenUsersList

    HIDE:
    sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add account1 account2
    (still works on LEOpard too)

    UN-HIDE ALL HIDDEN ACCOUNTS:
    sudo defaults delete /Library/Preferences/com.apple.loginwindow HiddenUsersList
  3. To "hide" an ADMIN account from appearing on the login screen,
    set the UID to less than 500 via Netinfo Manager.
    - See also: http://www.macosxhints.com/article.php?story=20030912130602462
    - To use your hidden account, press the down arrow once at the login panel,
    and then press option (ALT) and Return keys
    .

  4. Another silly way to hide secret stuff is in a FAKE app folder, just RENAME the folder xxxx.app
    - I know this sounds silly, but will keep most of the kids out !!!
    - Oh, and to see the CONTENTS just right mouse over and say SHOW CONTENTS....


back

© Gary Sullivan Maintainer of this page.
The URL of this page is:
http://www.hackerskitchen.com/mac-old/_hide.html
Constructive Comments, Suggestions and Requests are welcome.

Hello

Go Home