This is the mail archive of the cygwin 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]

slogin and problems with network shares


When I slogin to WIndows now, and enter my password, the network shares
seem to behave differently.

Previously, I could do this to restore all the network connections:

if [ ! -z "$SSH_CONNECTION" ]
then
    echo "Logged in via ssh: now restoring any network connections"
    net use | \
        sed -n "s/^Unavailable[ \t]*\(.:\)[ \t]*\(.*\\\[^ ]*\)  *Microsoft Windows Network/net use \1 '\2'/p" \
            | sh > /dev/null 2>&1       # NB: the output is useless.
fi

Which turns the output from net use:

    $ net use
    New connections will be remembered.


    Status       Local     Remote                    Network

    -------------------------------------------------------------------------------
    Unavailable  L:        \\cisra\share             Microsoft Windows Network
    Unavailable  P:        \\abba\planning           Microsoft Windows Network
    Unavailable  U:        \\samba\luke              Microsoft Windows Network
    Unavailable  W:        \\samba\install\win32     Microsoft Windows Network
    Unavailable  Y:        \\samba\photorec          Microsoft Windows Network
    Unavailable  Z:        \\zoom\adaytum            Microsoft Windows Network
    OK                     \\handel\d                Microsoft Windows Network
    The command completed successfully.

into this:

    net use L: '\\cisra\share'
    net use P: '\\abba\planning'
    net use U: '\\samba\luke'
    net use W: '\\samba\install\win32'
    net use Y: '\\samba\photorec'
    net use Z: '\\zoom\adaytum'

But that no longer works.  Below, you'll see that the drive mapping for
X: has *not* been performed.

    $  net use \\\\handel\\d x:
    The command completed successfully.
    $ net use
    New connections will be remembered.


    Status       Local     Remote                    Network

    -------------------------------------------------------------------------------
    Unavailable  L:        \\cisra\share             Microsoft Windows Network
    Unavailable  P:        \\abba\planning           Microsoft Windows Network
    Unavailable  U:        \\samba\luke              Microsoft Windows Network
    Unavailable  W:        \\samba\install\win32     Microsoft Windows Network
    Unavailable  Y:        \\samba\photorec          Microsoft Windows Network
    Unavailable  Z:        \\zoom\adaytum            Microsoft Windows Network
    OK                     \\handel\d                Microsoft Windows Network
    The command completed successfully.

    $ ls -l x:/
    ls: x:/: No such file or directory

And the commands seem to fail in odd ways even when typed manually:

    $ net use \\\\samba\\luke u:
    System error 5 has occurred.

    Access is denied.
    $ net use L: '\\cisra\share'
    Enter the user name for 'cisra\share': System error 1223 has occurred.

    The operation was canceled by the user.

    The password is invalid for \\cisra\share.

    $ net use U: '\\samba\luke'
    Enter the user name for 'samba': System error 1223 has occurred.

    The operation was canceled by the user.

    The password is invalid for \\samba\luke.

    $ net use U: \\\\samba\\luke 
    Enter the user name for 'samba': System error 1223 has occurred.

    The operation was canceled by the user.

    The password is invalid for \\samba\luke.

If I run a cmd.exe shell from inside bash under ssh and try this, it
fails in an interesting way (note that it seems to try to read input
from somewhere other than stdin or the terminal, and reject the
(empty) password that it appeared to read:

    D:\home\luke>net use x: \\handel\d /user:cisra\luke 
    net use x: \\handel\d /user:cisra\luke 
    Enter the password for 'cisra\luke' to connect to 'handel': Enter the password for 'cisra\luke' to connect to 'handel': System error 5 has occurred.

    Access is denied.

    The password is invalid for \\handel\d.

The system is running Windows XP SP1.  cygcheck -s attached.

Any ideas?  Would this be a Cygwin/OpenSSH change, or a Windows service
pack thing, or a Samba problem, or ...?

What should I do to try to track down why this no longer works?

I've rebooted, which hasn't made a difference.

luke

Attachment: cygcheck.txt
Description: cygcheck.txt

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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