New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus • Advice and insight from world-class Apple enthusiasts • Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

su password


Post Reply New Thread Subscribe

 
Thread Tools
thermidor

 
Member Since: Feb 28, 2005
Location: Bagshot, Surrey, UK
Posts: 198
thermidor will become famous soon enough
Mac Specs: Powerbook 17" 1.5GHz, 2GB, 160GB Momentus; iMac 24" 3.06GHz, 2GB; iPhone 2.5G 8GB; iPod 5G 60GB

thermidor is offline
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!
QUOTE Thanks
meltbanana314
Guest
 
Posts: n/a

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.
QUOTE Thanks
thermidor

 
Member Since: Feb 28, 2005
Location: Bagshot, Surrey, UK
Posts: 198
thermidor will become famous soon enough
Mac Specs: Powerbook 17" 1.5GHz, 2GB, 160GB Momentus; iMac 24" 3.06GHz, 2GB; iPhone 2.5G 8GB; iPod 5G 60GB

thermidor is offline
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!
QUOTE Thanks
zero17
Guest
 
Posts: n/a

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..
QUOTE Thanks
cradom

 
cradom's Avatar
 
Member Since: Feb 14, 2004
Location: Nederland, Texas
Posts: 3,102
cradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant futurecradom has a brilliant future
Mac Specs: 21in iMac core2 Duo- 13in macbook - 10.9 on both

cradom is offline
There's a good reason Apple didn't enable root. What are you trying to do that you can't use sudo?

Craig Domingue - resident redneck.
“Never argue with an idiot. He will only bring you down to his level and beat you with experience.”, George Carlin
QUOTE Thanks
witeshark

 
witeshark's Avatar
 
Member Since: Mar 09, 2004
Location: Miami FL
Posts: 2,860
witeshark will become famous soon enough
Mac Specs: G4 1Ghz OS X 10.4.7

witeshark is offline
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
:
QUOTE Thanks
thermidor

 
Member Since: Feb 28, 2005
Location: Bagshot, Surrey, UK
Posts: 198
thermidor will become famous soon enough
Mac Specs: Powerbook 17" 1.5GHz, 2GB, 160GB Momentus; iMac 24" 3.06GHz, 2GB; iPhone 2.5G 8GB; iPod 5G 60GB

thermidor is offline
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?
QUOTE Thanks
Amen-Moses

 
Member Since: Apr 25, 2003
Location: The home of the free and the land that did for Braveheart.
Posts: 1,301
Amen-Moses is just really niceAmen-Moses is just really niceAmen-Moses is just really niceAmen-Moses is just really nice
Mac Specs: 24"iMac, 15"MB-Pro, MacBook, G4 iMac, PM G5 2x2Ghz, G4 iBook & Some PCs

Amen-Moses is offline
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
QUOTE Thanks
zero17
Guest
 
Posts: n/a

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.
QUOTE Thanks
GLJones

 
GLJones's Avatar
 
Member Since: Feb 11, 2004
Location: Orlando, Florida
Posts: 125
GLJones is on a distinguished road
Mac Specs: 1.6 ghz G5, Dual Monitors / 17" PowerBook 1.33 / 12" iBook

GLJones is offline
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.
QUOTE Thanks
Avalon

 
Avalon's Avatar
 
Member Since: Jun 25, 2004
Location: Luxemburg, Europe
Posts: 1,779
Avalon is just really niceAvalon is just really niceAvalon is just really niceAvalon is just really nice
Mac Specs: PowerMac G5 Dual 2GHz (June 2004), 2.5GB, Airport, black 5G iPod 30GB, white MacBook 2.0 2GB

Avalon is offline
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...
QUOTE Thanks
Rogue Agent
Guest
 
Posts: n/a

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
QUOTE Thanks

Post Reply New Thread Subscribe


« Mail question after upgrading to Tiger | Loud Fans with Tiger Install »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
ethernet password probelms digirep Switcher Hangout 3 04-30-2006 01:14 PM
Unknown password noahsmom OS X - Operating System 1 02-03-2005 02:09 PM
NetInfo and password creation azrail OS X - Development and Darwin 13 11-08-2004 10:19 AM
Networking Help! Password fails katie2 OS X - Operating System 2 11-02-2004 02:06 PM
Airport keeps losing the network password MoltenLava Internet, Networking, and Wireless 2 06-13-2004 12:27 AM

All times are GMT -4. The time now is 08:32 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?