[comp.unix.ultrix] Problems with su/csh on Ultrix 4.0/DECstation 5000

boehme@leah.albany.edu (Eric M. Boehm) (11/27/90)

I have run into a problem out of the blue. Suddenly, our DECstation 500
won't let me use su to switch to another user. I get the following error
message:

getwd: can't open .. -- can't start new shell

This happened suddenly. Also, after rebooting the machine, su may work
once or twice and then give the error message. This also screws up
commands I have in crontab -- they do not get run. Lately, even commands
running as root in crontab weren't being run. I even went so far as to
redo the Ultrix installation. That did not help. 

Any suggestions would be greatly appreciated. Please respond (if by
e-mail) to boehme@unvax.union.edu.

Thanks in advance.

--
Eric M. Boehm
boehme@unvax.union.edu
boehme@union.bitnet

weimer@ssd.kodak.com (Gary Weimer) (11/27/90)

In article <1990Nov27.005226.18032@sarah.albany.edu> boehme@unvax.union.edu (Eric M. Boehm) writes:
>
>I have run into a problem out of the blue. Suddenly, our DECstation 500
>won't let me use su to switch to another user. I get the following error
>message:
>
>getwd: can't open .. -- can't start new shell
>
>This happened suddenly. Also, after rebooting the machine, su may work
>once or twice and then give the error message. This also screws up
>commands I have in crontab -- they do not get run. Lately, even commands
>running as root in crontab weren't being run. I even went so far as to
>redo the Ultrix installation. That did not help. 

Try changing to a different directory. The error message is telling you that
you do not have permission (read? execute?--I forget what you need) for the
previous directory (..). For some reason, su needs to access every directory
in your current path to be able to access the /etc/passwd file (added
security?). Changing directories, or adding permission to directories in
your path should fix the problem.

Gary Weimer

boehme@leah.albany.edu (Eric M. Boehm) (11/28/90)

Thanks to all who responded. The problem seemed to be the directory
permissions/ownership. I didn't think they would affect su on the way
*up* the directory tree, but it appears they do.

Additionally, I found some other permissions were not what I thought
they were.

--
Eric M. Boehme
boehme@unvax.union.edu
boehme@union.bitnet

barrett@jhunix.HCF.JHU.EDU (Dan Barrett) (11/29/90)

In article <1990Nov27.141002.5396@ssd.kodak.com> weimer@ssd.kodak.com (Gary Weimer) writes:
>For some reason, su needs to access every directory
>in your current path to be able to access the /etc/passwd file (added
>security?).

	I think there's a simpler explanation.  Imagine what would happen
if you were in a private directory:

		$ cd
		$ mkdir private
		$ chmod 700 private
		$ cd private

and then you tried to "su" to another user and succeeded:

		$ su anotheruser
		Password:
		%

Now "anotheruser" is inside your protected directory.  This contradicts
the mode (-rwx------) of the directory "private", and therefore it cannot
happen.

                                                        Dan

 //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
| Dan Barrett, Department of Computer Science      Johns Hopkins University |
| INTERNET:   barrett@cs.jhu.edu           |                                |
| COMPUSERVE: >internet:barrett@cs.jhu.edu | UUCP:   barrett@jhunix.UUCP    |
 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////