PDA

View Full Version : No sudo, no root, no sudo…


Yazombie
04-30-2002, 05:20 AM
Hi,

I recently got aware of a problem I have with the sudo command. It never replies anything but "etc/sudoers is 0777, should be 0440".
I found a fix for it on macosxhints with no problem BUT it needs a root access. And of course, I can't get it, because the fixing commands require… sudo!!! .
About root access: It is said to be activated in the NetInfo Manager, but when I type "root" in a Terminal window, I get "no such command" as the only reply.
If I try to deactivate root account in NetInfo Manager, it get the "NetInfo error. Write failed (operation succeeded)" message.
I tried once to activate root through the CD starting, but I still get the same results.

Thanks for your help.

YAZ

mervTormel
04-30-2002, 05:45 AM
enable root user in netinfo manager

then, in terminal.app

% su
password:

# chmod 0440 /etc/sudoers

# exit

% exit

if su gives you problems, report back here.

Yazombie
04-30-2002, 11:05 AM
As I said, I can't get root to "work"!!!

mervTormel
04-30-2002, 11:19 AM
you'll have to be more explicit. you said you typed 'root' in the shell. that's a no-op. the shell told you there is no command by that name. now i'm confirming it.

ignoring errors, can you enable root user in netinfo manager?

can you issue the 'su' command in the shell?

% su
password:

#

Yazombie
04-30-2002, 01:32 PM
OK, I finally got root to work (apparently it doesn't like the password omar which I used to set).
So, I issued the command you indicated, BUT, it now says "/etc/sudoers is owned by gid 80, should be 0" when I try the sudo command. And then displays the following message (which is scary): "/etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: Group writable directory"
Will it ever end?
Thanks very much for your help so far!!!

mervTormel
04-30-2002, 01:52 PM
did you happen to run the app BatChmod on your root dir?! this could get nasty.

it will either end, or it won't. so now, in the shell, issue...

% su
password:

# chgrp wheel /etc/sudoers

# exit

as for the "Group writable directory" issue, please search the forums for that topic as there is quite a bit you'll need to know to decide how to deal with that business. don't be scared. it's (mostly) harmless.

as for telling us your password, be scared and refrain from mentioning passwords and research some better password creation techniques.

Yazombie
04-30-2002, 02:12 PM
thanks a lot for your help.
Everything is all right now when it comes to sudo, it seems.
As for my password, don't worry, I didn't give the actual one, but a former which never seemed to be useful!!!
Thanks again.