The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - General (http://hintsforums.macworld.com/forumdisplay.php?f=16)
-   -   su in not working?? (http://hintsforums.macworld.com/showthread.php?t=42909)

gsprague 08-03-2005 02:33 PM

su in not working??
 
Hello All,

I am trying to su in on one of the X serves here at work. The root user is enabled in Netinfo and I can change it the password fine in there. However, when I try to su in, the terminal says it is the wrong password. When I try to changing it via "passwd root" in the terminal it changes fine but again when I try to su in it still doesn't work. So Netinfo and "passwd root" both allow me to change the root password but I still cannot su in via the terminal. Eventually the systems locks you out, l saw that in the console but I have waited long enough to try again. Any ideas? I have also repaired permissions about 3 times, no diff.

Thanks!

cwtnospam 08-03-2005 03:55 PM

I believe su is disabled by default. Try using sudo.

guardian34 08-03-2005 04:47 PM

su is not disabled by default, but the root account is.

heluani 08-03-2005 05:38 PM

I believe this might be the answer to your problem:

Quote:

From the man page su(1):
If group 0 (normally ``wheel'') has users listed then only those users
can su to ``root''. It is not sufficient to change a user's /etc/passwd
entry to add them to the ``wheel'' group; they must explicitly be listed
in /etc/group. If no one is in the ``wheel'' group, it is ignored, and
anyone who knows the root password is permitted to su to ``root''.
R.

gsprague 08-04-2005 10:52 AM

I removed root from wheel. Didn't make a difference. Any other ideas?

Thanks!

yellow 08-04-2005 10:59 AM

This is actually a problem, because using passwd to change the password doesn't effect NetInfo database. To change the root password, you need to be using NetInfo Manager.

hayne 08-04-2005 11:34 AM

Quote:

Originally Posted by gsprague
Any other ideas?

Maybe you want to explain why exactly you need to use 'su root'.
It would be better to use 'sudo' (when logged in as an admin user).
If you really need extended root access (as opposed to the 5 minutes at a time before being prompted for a password), you could start a new shell with:
sudo -s
I see no need to 'su' to 'root'.

And I would put 'root' back into the 'wheel' group without delay. Some files/folders have 'wheel' as group-ownership.

gsprague 08-04-2005 11:40 AM

Yeah Netinfo manager is not working either.

yellow 08-04-2005 11:45 AM

Quote:

Originally Posted by hayne
And I would put 'root' back into the 'wheel' group without delay. Some files/folders have 'wheel' as group-ownership.

I second this one.

I will agree that you need not use su either.

However, if you end up continuing on this path, simply change the root password in NetInfo Manager (Users->Root->password) to a *, effectively locking it. Save/Quit NetInfo Manager, and reopen it, and attempt to change the password again.

gsprague 08-05-2005 08:22 AM

Netinfo locked and cleared the password. But then the root password doesn't work in the terminal. I remember this happening before and I used passwd root in the terminal to fix it. I know netinfo manager is buggy when it comes to changing passwords. Is there any other way? Maybe boot from disc and change root that way?

Thanks!

ajp 08-05-2005 11:01 AM

Quote:

Originally Posted by gsprague
Netinfo locked and cleared the password. But then the root password doesn't work in the terminal. I remember this happening before and I used passwd root in the terminal to fix it. I know netinfo manager is buggy when it comes to changing passwords. Is there any other way? Maybe boot from disc and change root that way?

Thanks!

is there any reason you're ignoring all the people telling you about sudo? also i seem to remember something from somewhere that root passwds cannot be blank. that may be from a different OS though.

yellow 08-05-2005 11:15 AM

When was the last time /etc/passwd was edited/touched? Is the root password still disabled in the gecos field?

gsprague 08-08-2005 08:01 AM

Whether it's su or sudo the root pass is not working. You set it to the "*" in Netinfo and then you can set the root pass to whatever you want via the security menu. Then when I try to su or sudo in, in the terminal it doesn't work.

yellow 08-08-2005 09:25 AM

sudo doesn't have anything to do with root or the root pssword. If owner of the shell is part of /etc/sudoers (and all admin accounts are), then sudo will use the account password of the owner of the shell.

hayne 08-08-2005 10:20 AM

Quote:

Originally Posted by yellow
sudo doesn't have anything to do with root or the root pssword. If owner of the shell is part of /etc/sudoers (and all admin accounts are), then sudo will use the account password of the owner of the shell.

To further emphasize this point,
the recommended configuration is to have the root password disabled (via NetInfo's menu) and then to use 'sudo' when logged in as an admin user and 'root' access is needed.

Note: you can tell if your current user is an admin user via the 'id' command. If it is an admin, then 'admin' will show up in results from that command.

gsprague 08-10-2005 09:38 AM

Sudo is not working either and I am logged in as an admin. This is getting frustrating. I am just going to do a re-install of the OS.

yellow 08-10-2005 10:14 AM

Define "not working". Complaining that you're not part of sudoers? That it cannot find the command? That it cannot find sudo? Are you doing something sudo cannot do, like "sudo cd"?

ajp 08-10-2005 01:14 PM

make sure you are not typing the root passwd int sudo, use the password for the admin account you are using.

gsprague 08-15-2005 11:01 AM

Sudo is working and probably working all along. I was testing it with a CD. But I tested it with a CP and it is working. su on the other hand is working. Both my root and admin passwords are the same.

hayne 08-15-2005 12:14 PM

Quote:

Originally Posted by gsprague
Both my root and admin passwords are the same.

That in itself is a bad idea.

gsprague 08-15-2005 12:28 PM

Sorry had a typo su on the other hand is NOT working?


All times are GMT -5. The time now is 05:59 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.