The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - General (http://hintsforums.macworld.com/forumdisplay.php?f=16)
-   -   sudo: command not found (http://hintsforums.macworld.com/showthread.php?t=20781)

sao 02-17-2004 12:56 AM

tas,

--Did you by chance deselect the "BSD Subsystem" item of the custom install screen when installing OS X?

--It could also be permission problems or your shell startup scripts are not configured correctly.

Please, what gives:

echo $SHELL
echo $0



PS: If you missed installing the BSD Subsystem, just insert your Panther CD and find the Welcome to Mac OS X/Optional Installs/BSD Subsystem file and double-click it.

tas 02-17-2004 04:14 AM

Hayne: here's what I get:
Code:

% ls -ld /bin
drwxr-xr-x  35 root  wheel  1190 15 Nov 07:21 /bin
% id
uid=501(bzm) gid=501(bzm) groups=501(bzm), 79(appserverusr), 80(admin), 81(appserveradm)

Everything looks correct, right.

Sao: if I had forgotten to install the BSD subsystem, the commands wouldn't work at all. Everything works fine, except under sudo.
Code:

% echo $SHELL
/bin/zsh
% echo $0
-zsh


hayne 02-17-2004 10:24 AM

I'm running out of ideas.
I would suggest re-installing 'sudo' and associated files by using the third-party "Pacifist" utility to extract them from the Install CD.

The only other idea I have is to try making a fresh new user account, leaving this account with the default shell (bash), make this account be an administrator as well, then see if sudo works with this new account.

yellow 02-17-2004 10:27 AM

Possibly mine is a hold-over from Jaguar?
Code:

yellow% id
uid=501(yellow) gid=80(admin) groups=80(admin), 0(wheel)


tas 02-17-2004 10:43 AM

Hayne, I thought of something similar. i just copied over the version of "sudo" from my G5 (where it works) to the Powerbook, but nada. Do you have any idea what the "associated files" would be?

hayne 02-17-2004 11:02 AM

tas: The only associated file I know of is the sudoers file. But do try creating a new user as I suggested above - that is more likely to lead us to a solution.

yellow: Yes, I think your user account is the same as it was under Jaguar since you kept your users when you installed Panther. If you do a fresh install or if you create a new user, it will get the new Panther features.

sao 02-17-2004 11:25 AM

Code:

[pm @ Sao: ~] % grepbom sudo
...................../private/etc/pam.d/sudo    281    Sat Sep 13 08:06:12 2003
./private/etc/sudoers  341    Sat Sep 13 12:29:01 2003
./usr/bin/sudo  96,540  Wed Sep 24 14:48:17 2003
./usr/sbin/visudo      69,592  Wed Sep 24 14:48:17 2003
./usr/share/man/man5/sudoers.5  45,390  Sat Sep 13 12:29:02 2003
./usr/share/man/man8/sudo.8    19,387  Sat Sep 13 12:29:01 2003
./usr/share/man/man8/visudo.8  10,001  Sat Sep 13 12:29:02 2003
./usr/share/zsh/4.1.1/functions/_sudo  650    Sat Sep 13 09:51:06 2003
  ====> /Library/Receipts/Essentials.pkg/Contents/Archive.bom


...................................................................


tas 02-17-2004 12:16 PM

OK, problem solved. And thanks to everybody, you were amazingly helpful!! Hayne, you were right, I should have done that right away. I created a new user, and lo and behold: sudo worked. I then moved all my .z-files to another directory and copied them back in one by one. The offending party was .zshenv. I had copied it over from my own computer and forgotten that it contained a reference to the teTeX manpath that isn't installed on my wife's computer. Apparently, zsh choked on it to such an extent that sudo wouldn't work. As soon as I deleted the line about manpath, it worked normally. Why a reference to manpath shoud affect sudo (and apparently nothing else) is beyond me; I'll put this down under "UNIX voodoo." Best part: I could do most of it remotely, so my wife hasn't realized, and now she has a Mac that'll hopefully work flawlessly. Phew...


All times are GMT -5. The time now is 05:48 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.