after changing a user's home dir, cd ~user in ksh still use old dir

after changing a user's home dir, cd ~user in ksh still use old dir

Post by Michael Wa » Sun, 04 Apr 1999 04:00:00



See example below:

[julie:/export/home/root]grep oracle7 /etc/passwd
oracle7:x:65535:65535:Oracle Workgroup Server user:/opt:/usr/bin/sh
[julie:/export/home/root]cd ~oracle7            
ksh: /opt/oracle7:  not found

Please note another subshell will do fine:

[julie:/export/home/root]/bin/ksh
[julie:/export/home/root]cd ~oracle7  

What does this mean? Thanks.
--
Michael Wang
http://www.mindspring.com/~mwang

 
 
 

after changing a user's home dir, cd ~user in ksh still use old dir

Post by Barry Margoli » Wed, 07 Apr 1999 04:00:00




>See example below:

>[julie:/export/home/root]grep oracle7 /etc/passwd
>oracle7:x:65535:65535:Oracle Workgroup Server user:/opt:/usr/bin/sh
>[julie:/export/home/root]cd ~oracle7            
>ksh: /opt/oracle7:  not found

>Please note another subshell will do fine:

>[julie:/export/home/root]/bin/ksh
>[julie:/export/home/root]cd ~oracle7  

>What does this mean? Thanks.

It sounds like ksh caches the result of tilde expansion, rather than
looking it up in /etc/passwd every time.

--

GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

after changing a user's home dir, cd ~user in ksh still use old dir

Post by Lai Wai Lun Ala » Thu, 08 Apr 1999 04:00:00


"~<username>" cannot be recongnized by the Bourn shell (sh) but the Korn
shell (ksh).
Therefore, you need to change the default shell as well.

Best Regards,
Alan Lai


>See example below:

>[julie:/export/home/root]grep oracle7 /etc/passwd
>oracle7:x:65535:65535:Oracle Workgroup Server user:/opt:/usr/bin/sh
>[julie:/export/home/root]cd ~oracle7
>ksh: /opt/oracle7:  not found

>Please note another subshell will do fine:

>[julie:/export/home/root]/bin/ksh
>[julie:/export/home/root]cd ~oracle7

>What does this mean? Thanks.
>--
>Michael Wang
>http://www.mindspring.com/~mwang

 
 
 

after changing a user's home dir, cd ~user in ksh still use old dir

Post by Michael Wa » Thu, 08 Apr 1999 04:00:00




Quote:>"~<username>" cannot be recongnized by the Bourn shell (sh) but the Korn
>shell (ksh).
>Therefore, you need to change the default shell as well.

what are you taking about? Thanks.

--
Michael Wang
http://www.mindspring.com/~mwang

 
 
 

1. user can cd or view files on other user $HOME dir

I just wonder why a normal user created on (maybe just on my
box) openBSD-2.5 could cd to others' home dirs plus the /root !!! ???? .
On some other *nix systems e.g linux or solaris, a user could not get to
somebody else home dir ...

Even though he/she could not write to others but he could view whatever
files in others' home dirs as long as the read permission is set.

Or did I miss anything when I created the user accounts.

Thanks in advance

)erekose)

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

2. Installing Patches

3. weird... can't put a cd \dir\dir\dir\ in a .csh file...

4. Reconfigure FreeBSD's boot manager

5. Creating some identical files/dir's in all users dir's

6. Server/workstation usage....

7. How to prevent users from cd:ing out of their home dir?

8. Sol 8 installation: gateway setting

9. adding new user with SMC won't create home dir

10. NIS client has users but doesn't create their home dirs

11. Getting a user's home dir in sh

12. Automount: can't I see user home dirs ?

13. users' home dirs not found, bounced mail