Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't cd into a folder that I created, I believe I might have fiddled with chmod I while ago.

Strange if I type: su and my password it says wrong password, although I am the owner of the laptop and have the admin account (there is only 1 account which is mine).


share|improve this question
Your question is a little unclear to me... you can't login as root because you forgot the password, and your can't enter a folder because you're no longer the owner? Is that correct? – goblinbox Jun 16 '11 at 3:04
i can login just find, but I can't access a folder on my system when in terminal i.e. cd my_folder/ says access denied. I am the root user as far as I know! – user27449 Jun 16 '11 at 3:33
get some more data on the folder -- stat folderName, match it with your details (id) and reconfirm the folder permissions. – nik Jun 16 '11 at 4:29
up vote 2 down vote accepted

Right-click that folder, select Get Info, if necessary click the lock to the lower right, and add your user account to the list by clicking the + button add the bottom. Make sure your privilege is Read & Write, select your user name, click the cogwheel and select Make username (me) the owner.

If you took away your execute privilege, that might not work though.

Alternatively, open Terminal and type

sudo chown your_user_shortname /path/to/folder
sudo chmod u+rwx /path/to/folder

You can drag&drop the folder onto the Terminal window to keep from having to type the path.

su requires you to type the target user's password (root by default). Try it by typing:

su $( whoami )

It works after entering your password. root doesn't have a password on OS X to prevent root logins though.

If you're an Administrator (i.e. member of the wheel group which is granted sudo privileges in /etc/sudoers), you need to sudo first. Do the following:

sudo su

This allows you to type your account's password and then execute su after you get additional privileges from sudo.

share|improve this answer

Your Answer


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.