PDA

View Full Version : sudo, su...




starikarp
Apr 27, 2013, 05:54 AM
Hi!

I am new in the forum and new in Mac world too but I have experience with Linux and last eight years with FreeBSD.
I have problem with su/sudo. Whenever I try to do something with sudo it asked me for password which is normal but when I type correct one from admin I got Sorry try again...
Do I need to check user for "Allow user to administer this computer", please? Or is something else?

Thanks in advance...



justperry
Apr 27, 2013, 06:00 AM
Hi!

I am new in the forum and new in Mac world too but I have experience with Linux and last eight years with FreeBSD.
I have problem with su/sudo. Whenever I try to do something with sudo it asked me for password which is normal but when I type correct one from admin I got Sorry try again...
Do I need to check user for "Allow user to administer this computer", please? Or is something else?

Thanks in advance...

Bold: If you see this in your own User Account it means you are already an Admin.

Something else is going on.
If you install an App and it asks for your password will it work there?

starikarp
Apr 27, 2013, 06:07 AM
Bold: If you see this in your own User Account it means you are already an Admin.

Something else is going on.
If you install an App and it asks for your password will it work there?

Yes, it works.

justperry
Apr 27, 2013, 06:20 AM
Yes, it works.

:confused:

Now, what you could do is open the system log, with console, leave it open and type a sudo command in terminal, enter your password and if you get that error again right away look into the system log, it might give you insight to what is going on, it should have an entry.

benwiggy
Apr 27, 2013, 07:11 AM
Do I need to check user for "Allow user to administer this computer"?
That should be checked for an admin user.

I have experience with Linux and last eight years with FreeBSD.
Have you "modified" OS X in any way?

starikarp
Apr 27, 2013, 08:42 PM
That should be checked for an admin user.


Have you "modified" OS X in any way?

No, I didn't modify anything...
I bought iMac i7 from my friend. He upgrade on Mountain Lion long time ago. When I start (turn on) computer it ask me to setup account and some other things as a new owner. I was as Administrator and than I added a user for everyday work. I installed some programs (GIMP, LibreOffice...Xcode) and I try to install ffmpeg and I found it that sudo doesn't work.
Today I login as administrator, try to see /etc/sudoers and I got:
sudoers: Permission denied

Surprise...

Thank you.

starikarp
Apr 27, 2013, 09:14 PM
Again me...
What I found it in Users & Groups.
In Network Account Server - Directory Editor user who should be administrator it shows at recordtype:
dsRecTypeStandard:Users

It is the same as standard user. But on the first page it shows name, bellow is Admin and Allow user to administer this computer has a check mark.

benwiggy
Apr 28, 2013, 03:14 AM
Don't start messing with the Directory Service database.
Both my admin accounts have "recordtype: dsRecTypeStandard:Users".

1. Turn on admin privileges to your Standard account. This will, hopefully, give you some admin ability.
2. Turn OFF admin privs in the Admin account. Leave the Users & Groups Pref pane. Then go back and turn it on. See if that helps.

starikarp
Apr 28, 2013, 05:32 AM
Don't start messing with the Directory Service database.
Both my admin accounts have "recordtype: dsRecTypeStandard:Users".

1. Turn on admin privileges to your Standard account. This will, hopefully, give you some admin ability.
2. Turn OFF admin privs in the Admin account. Leave the Users & Groups Pref pane. Then go back and turn it on. See if that helps.

Thank you very much. It works.