Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is there a way to (temporarily) view another user's file on OS X other than to change the permissions of the file? I'd like the OS to ask for the user name/password.

I guess what I'm looking for is something like Window's idea of running Windows Explorer as another user (ideally at file/directory level only). The ssh idea fails because the Finder cannot recognize the permission granted.

An absolute requirement is not to move the user's files.

share|improve this question
    
Why couldn't you just log in as the user that owns the files? –  CoffeeRain May 31 '12 at 13:17
1  
@CoffeeRain I need access to the two accounts simultaneously. –  John Smith May 31 '12 at 14:58

2 Answers 2

EDITED to match edited requirements.

You can achieve exactly what you want by creating a Shared folder. To do so go to System Preferences > Sharing > File Sharing and Add all the folders you want to share.

You can do this, too, by directly selecting a folder in the Finder,, choosing Get Info from the File menu, and enable Shared Folder to share it (or deselect "Shared Folder" to stop sharing the folder).

Extracted from Apple's 101: File Sharing.


You can achieve this in a couple of ways.

Logging as root will grant you read and write privileges to all areas of the file system. You'll need to have the root user enabled. To do so, assuming you're using Lion:

  1. Go to System Prefereces > Accounts.
  2. Click the lock and authenticate with an administrator account.
  3. Click Login Options.
  4. Click the Edit or Join button at the bottom right.
  5. Open Directory Utility.
  6. Authenticate with an administration account.
  7. Choose Enable Root User from the Edit menu.
  8. Enter the root password.

Here is described for earlier OS.

Placing the file under the Shared Folder (/Users/Shared), or Sharing the folder, the one where the file you want to edit is, will grant other users access to that file. More about it, and how to Share other folders here.

share|improve this answer
    
I'm familiar with both those methods. The first method does not let Finder open the file/directory. Sure it works on the command line but you cannot edit excel files there. The second method is destructive in the sense that the user has to move his files to a particular place. –  John Smith May 31 '12 at 10:15
    
Enabling the root user is not necessary and usually a bad idea. You can achieve the same end more safely using su and sudo. At your shell prompt su - <administratorname> this will prompt for the admin password and you will become the admin user. From here you can use sudo on any command to achieve root access for that command only e.g sudo ls /Users/<otheruser>. If you need to interact with applications and files from the other user account then use open <filename> or open -A <appname> from the shell to launch from admin account –  Kevin May 31 '12 at 10:16
    
I ment logging as root, not through terminal but with the logging screen. Chanching user. And for the sharing folder, i'll edit my answer, as I was not clear enough. –  Thecafremo May 31 '12 at 10:34
    
@Kevin Tried with iTunes, failed with : LSOpenURLsWithRole() failed for the application /Applications/iTunes.app with error -10810. –  John Smith May 31 '12 at 17:42

An easier method is to use root privileges or just impersonate the user. Open up a terminal and do man su and man sudo for more information.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.