Results 1 to 12 of 12

Thread: su password

  1. #1
    su password

    Member Since
    Feb 28, 2005
    Location
    Bagshot, Surrey, UK
    Posts
    198
    Specs:
    Powerbook 17" 1.5GHz, 2GB, 160GB Momentus; iMac 24" 3.06GHz, 2GB; iPhone 2.5G 8GB; iPod 5G 60GB
    su password
    I feel so stupid asking this... but...

    I have 2 accounts set up on my Powerbook (one for me, one for my wife). My account is the first account which was set up and has a password.

    However, when I try to su from a shell, this password doesn't work. What password am I being asked for when I su?

    I don't remember setting up any other passwords when I first set up the machine other than the account password for my account.

    Any help appreciated... I'm sure the answer will make me groan!

  2. #2
    meltbanana314
    Guest
    Quote Originally Posted by thermidor
    I feel so stupid asking this... but...

    I have 2 accounts set up on my Powerbook (one for me, one for my wife). My account is the first account which was set up and has a password.

    However, when I try to su from a shell, this password doesn't work. What password am I being asked for when I su?

    I don't remember setting up any other passwords when I first set up the machine other than the account password for my account.

    Any help appreciated... I'm sure the answer will make me groan!
    The correct term is "sudo" though it's often abbreviated to 'su'.

    You are being asked for *your* password, but you have to be on the /etc/sudoers list I believe.

  3. #3
    su password

    Member Since
    Feb 28, 2005
    Location
    Bagshot, Surrey, UK
    Posts
    198
    Specs:
    Powerbook 17" 1.5GHz, 2GB, 160GB Momentus; iMac 24" 3.06GHz, 2GB; iPhone 2.5G 8GB; iPod 5G 60GB
    I was phrasing on the basis that sudo runs another process as superuser, but su drops the shell into superuser login... hence my usage of su, if that makes sense. What I'm literally trying to do is type su into a shell. But I presume the answer to my question is independent of whether I su or sudo!

    Problem: cat /etc/sudoers gives Permission Denied - Catch 22!

  4. #4
    zero17
    Guest
    Quote Originally Posted by thermidor
    I feel so stupid asking this... but...

    I have 2 accounts set up on my Powerbook (one for me, one for my wife). My account is the first account which was set up and has a password.

    However, when I try to su from a shell, this password doesn't work. What password am I being asked for when I su?

    I don't remember setting up any other passwords when I first set up the machine other than the account password for my account.

    Any help appreciated... I'm sure the answer will make me groan!
    I used to have the same problem, because of apple is not make root account set up on every account (different w/ linux). I forgot how I did it, but basically you have to set up your root password first if you haven't create one. and after you set it up, you would be able to login as a root with "su" on the terminal.

    I found this on the net, and hopefully help:

    First thing - enable the root account

    For some reason... Apple doesn't make the root account setup part of the installation - so you'll probably realize you can't use the account the first time you have the need.

    Quickest fix... just do a 'sudo passwd root' and run through the passwd prompts to establish your new root password.

    There are other indirect ways to accomplish the same thing... but chances are you're already in a terminal.

    or check this out for enabling root on mac os x
    http://noether.vassar.edu/~myers/hel...nableRoot.html

    hopefully help..

  5. #5
    su password
    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Nederland, Texas
    Posts
    4,081
    Specs:
    13in macbook - 10.10.4
    There's a good reason Apple didn't enable root. What are you trying to do that you can't use sudo?
    Craig Domingue
    (\__/)
    (='.'=) This is Bunny. Copy and paste Bunny into your
    (")_(") signature to help him gain world domination

  6. #6
    su password
    witeshark's Avatar
    Member Since
    Mar 09, 2004
    Location
    Miami FL
    Posts
    2,860
    Specs:
    G4 1Ghz OS X 10.4.7
    SUDO = super user do operation SU = switch user need user switch to name to procede SU:
    NAME
    su - substitute user identity

    SYNOPSIS
    su [-flm] [login] [-c shell arguments]

    DESCRIPTION
    su requests the password for login and switches to that user and group ID
    after obtaining proper authentication. A shell is then executed, and any
    additional shell arguments after the login name are passed to the shell.
    If su is executed by root, no password is requested and a shell with the
    appropriate user ID is executed.

    The options are as follows:

    -c Invoke the following command in a subshell as the specified user.

    -f If the invoked shell is csh(1), this option prevents it from
    reading the ``.cshrc'' file.

    -l Simulate a full login. The environment is discarded except for
    :

  7. #7
    su password

    Member Since
    Feb 28, 2005
    Location
    Bagshot, Surrey, UK
    Posts
    198
    Specs:
    Powerbook 17" 1.5GHz, 2GB, 160GB Momentus; iMac 24" 3.06GHz, 2GB; iPhone 2.5G 8GB; iPod 5G 60GB
    Quote Originally Posted by cradom
    There's a good reason Apple didn't enable root. What are you trying to do that you can't use sudo?
    I can't use sudo because it won't accept my normal login password... zero17 was telling me how to set up the root account so I can use the root password for sudo. Is there another way?

  8. #8
    su password

    Member Since
    Apr 25, 2003
    Location
    The home of the free and the land that did for Braveheart.
    Posts
    1,301
    Specs:
    24"iMac, 15"MB-Pro, MacBook, G4 iMac, PM G5 2x2Ghz, G4 iBook & Some PCs
    Quote Originally Posted by thermidor
    I feel so stupid asking this... but...

    I have 2 accounts set up on my Powerbook (one for me, one for my wife). My account is the first account which was set up and has a password.

    However, when I try to su from a shell, this password doesn't work. What password am I being asked for when I su?

    I don't remember setting up any other passwords when I first set up the machine other than the account password for my account.

    Any help appreciated... I'm sure the answer will make me groan!
    If you just type su without an account name it will default to root which probably doesn't exist, you have to type su <username>.

    Of courese if that is what you are doing I would say check that you are using the correct case for both username and password as unix is case sensitive.

    i.e if you used the username Chris and you are trying to su chris it won't work.

    Amen-Moses

  9. #9
    zero17
    Guest
    I don't know if this will help, I found it few weeks ago:

    File and Folder Ownership

    Again, here is an item which I experienced, but you might not. In case you do, though, you'll have a fix at hand. For reasons that had more to do with a broken NetInfo database than anything else, Jaguar didn't recognize me as me. I might as well have been somebody else, and to Jaguar I was. The solution was to take ownership of my original Home folder and its tree. There are two ways. The Mac way is to press Cmd-I while Home is highlighted in a Finder window, and make yourself the owner of this folder and all of its contents. The unix way is to pop a Terminal window and type the following:


    % man chown Check manual before starting (spacebar through)
    % pwd Verify present working directory
    % cd .. Move up one level above Home folder
    % ls List contents
    % sudo chown -R damien damien Take ownership of Home tree
    % cd / Move into root folder
    % sudo chown -R damien Applications Take ownership of Applications
    % exit

    Now, it's obvious enough why you should take ownership of your own stuff, but why Applications? Because you want to be able to add and remove items from it. Now the test is whether or not you are free to do this now. If you are, then leave it alone. But if it's a problem, you will know what to do.

    If things get really nasty, you may have to set file permissions also. I don't recommend this lightly, because certain files and folders have tighter security than others for a reason. But if you have to, here is how to set permissions on all of the files in your Home folder:


    % man chmod Check manual before starting (spacebar through)
    % pwd Verify present working directory
    % cd .. Move up one level above Home folder
    % ls List contents
    % sudo chmod -R 640 damien Set permissions in Home tree
    % cd / Move into root folder
    % sudo chmod -R 755 Applications Set permissions in Applications
    % exit

    If you absolutely have to set permissions on your Home folder, then also set tighter permissions on private files and folders. The code 740 makes a file usable by you, readable by other group members, and off-limits to anybody else. The code 600 sets it to read/write by you alone. The -R switch sets the recursive bit, so that all contained files and folders also get set. If you happen to use public and private keys, I recommend you create new key pairs after monkeying with permissions in Home. In general, this is very tricky stuff. Don't leave the door open, but don't lock yourself out either. Which brings us to a related topic.

  10. #10
    su password
    GLJones's Avatar
    Member Since
    Feb 11, 2004
    Location
    Orlando, Florida
    Posts
    125
    Specs:
    1.6 ghz G5, Dual Monitors / 17" PowerBook 1.33 / 12" iBook
    To enable the root user:
    Open NetInfo Manager, located in Applications > Utilities.
    Choose Security > Enable Root User and type a password for the root account. You may need to type an administrator password to make these changes.
    Choose Apple menu > Log Out.
    Choose Other in the Login window, type root in the Name field, and the root password in the Password field.

  11. #11
    su password
    Avalon's Avatar
    Member Since
    Jun 25, 2004
    Location
    Luxemburg, Europe
    Posts
    1,779
    Specs:
    PowerMac G5 Dual 2GHz (June 2004), 2.5GB, Airport, black 5G iPod 30GB, white MacBook 2.0 2GB
    Quote Originally Posted by GLJones
    To enable the root user:
    Open NetInfo Manager, located in Applications > Utilities.
    Choose Security > Enable Root User and type a password for the root account. You may need to type an administrator password to make these changes.
    Choose Apple menu > Log Out.
    Choose Other in the Login window, type root in the Name field, and the root password in the Password field.
    That's the correct way to enable the root account in OS X...
    But don't forget, the root user has ABSOLUTELY NO RESTRICTION, means there is no protection whatsoever against errors. If, as root, you throw away a system related item, it will destroy your OS, and you're welcome for a new install session...

    So you better know EXACTLY what you're doing.

    That's why Apple by default disables the root account, it's nothing to play around with...

  12. #12
    Rogue Agent
    Guest
    If you don't remember setting up any passwords when you first got/installed the computer, this may be a helpful article for you. Its noted to be specifically for 10.4 but it works back to 10.2 for sure, not certain about 10.1 and earlier.

    http://docs.info.apple.com/article.h.../en/mh655.html

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macbook Pro password & Network password
    By FrankieGib in forum OS X - Operating System
    Replies: 1
    Last Post: 02-18-2014, 07:55 AM
  2. Replies: 12
    Last Post: 03-03-2012, 06:37 PM
  3. Replies: 2
    Last Post: 11-03-2011, 01:26 AM
  4. Dlink router password setup. Forgot password
    By needhelpplease in forum Internet, Networking, and Wireless
    Replies: 4
    Last Post: 09-16-2009, 04:59 PM
  5. AEBS change from password protection to username\password
    By lampie73 in forum Internet, Networking, and Wireless
    Replies: 0
    Last Post: 05-04-2008, 03:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •