This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SSH into XP: mapped network drives disappeared!

The short version

How do I stop XP from hiding my mapped network drives from me, when 
I make a slogin to XP using Cygwin+SSH?

The long version

Hi :-) I've hunted a lot on the web and mailing list archives, so I
know a lot of people have had this same problem, but I haven't seen
anybody answer it in a way that worked for me yet, so ...

I downloaded and installed Cygwin yesterday on a XP system where my
home is not local: the passwords are managed centrally (a 'domain' 
account, right?) and the disk space is on a SAN/NAS thing, which
is accessible to XP and to Unix machines.

As 'Administrator' I ran the 'mkpasswd -l -d > /etc/passwd' and the
same for the groups file. (Actually first I tried it as myself, but
with the '-d' option it bombed out before getting the entry for
me with 'mkpassed: [5] Access denied', so then I tried as Administrator
and everything went well.)

I modified my $HOME in /etc/passwd to be /cygdrive/y, which the XP PC
has mapped to my home directory in the storage server. My ~/.profile
sufficiently OS-independent, that this works under Cygwin/XP and on
any of the various Unixes we run. Great so far.

One of the Cygwin components installed was SSH. I configured the server as
explained at

Ok, so now, when I run Cygwin from the XP machine itself (i.e. not through
slogin) then I see the following network drives:

        pc004545$ pwd
        pc004545$ ls
        <stuff in my home>
        pc004545$ cd /cygdrive    
        pc004545$ ls              
        c  d  g  h  y             

(My ~/.profile is changing the prompt from the Cygwin default.)

Now for the problem: when I 'slogin' into the XP box, I have no problems
being authenticated (not after I ran mkpasswd as 'Administrator' anyway), 
but '/cygdrive/y' is 'invisible' to my login shell, and I get a whole 
slew of errors accordingly:

        pc004545$ slogin localhost
        ahuxley@localhost's password:
        Could not chdir to home directory /cygdrive/y: No such file or directory
        mkdir: cannot create directory `/cygdrive/y': No such file or directory
        Copying skeleton files.
        These files are for the user to personalise
        their cygwin experience.
        These will never be overwritten.
        /usr/bin/install: cannot create directory `/cygdrive/y': No such file or directory
        /usr/bin/install: cannot create directory `/cygdrive/y': No such file or directory
        /usr/bin/install: cannot create directory `/cygdrive/y': No such file or directory
        -bash: cd: /cygdrive/y: No such file or directory
        ahuxley@PC004545 /etc/skel          <---- all of this is the prompt
        $                                   <---- still part of the prompt

'net use' before the 'slogin' shows the Y: drive, and obviously I can
cd to /cygdrive/y. 'net use' after 'slogin' shows Y: is there but "not 
available", and attempting to cd to /cygdrive/y obviously fails.

I've read, and indeed this 'net use' check seems to confirm, that this is 
not a Cygwin problem at all, but an XP problem.

So the question: what do I have to do XP to make it stop hiding my mapped
drives from my when I slogin?

Oh, one more thing: I saw people saying that you can just use 'net use ...'
but assign different drive letters each time. Unfortunately, since the drive 
I want to map is my home directory, and path to this (as it appears on the PC)
is written in /etc/passwd, and I can't/won't change /etc/passwd for each 
concurrent SSH I start, the solution must be one which makes the drive 
have a consistent mount/access point under XP. 

Also note, that the shell tries to put me in that home *before* /etc/profile
or ~/.profile are run, so some sort of 'net use <next-letter> //server/path;
ln -s ....' in /etc/profile probably isn't going to cut it.

Does anybody know the 'correct' solution to this problem? Many thanks!

Alexis Huxley

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]