Strange behavior of su

Stanley Friesen friesen at psivax.UUCP
Tue Sep 24 03:15:44 AEST 1985


In article <314 at aphasia.UUCP> gww at aphasia.UUCP (George Williams) writes:
>We are running bsd4.2 on a vax 750.
>
>Every now and then after I have been logged in for a while I will try to
>su, have su ask the password, and then it sits for a bit and exits.  It
>does not generate any error messages, the exit status is 0.  After this
>has happened it will keep happening until I log out, I have always been
>able to su immediately after logging in.
>
	Well, since at least two people have asked, I will make this a
Followup instead of a Reply.
	I too have had this problem, and it seems to occur when the
user specified to 'su' does not have r and x permissions to all
directories between / and the current working directory. All you need
to do to get around it is to cd to a directory with general r & x
permissions with the same permissions for all parent directories.
(Apparently the problem is that the *shell* will exit if it cannot
access the current directory, & since su thinks it has executed the
shell correctly it gives no error message.)
	P.S this also explains why this never happens when you su to
root, since root has universal access.
-- 

				Sarima (Stanley Friesen)

UUCP: {ttidca|ihnp4|sdcrdcf|quad1|nrcvax|bellcore|logico}!psivax!friesen
ARPA: ttidca!psivax!friesen at rand-unix.arpa



More information about the Comp.unix.wizards mailing list