This is the mail archive of the cygwin@sources.redhat.com 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]

Re: cygwin-1.1.4: problems with remote commands


* Corinna Vinschen
| > Ralf Fassel wrote:
| > > - the `net use' command is not able to read a password.
| 
| The reason here is that it's a windows tool. Don't know how they
| read a password but they seem to rely on specific console
| properties.

Probably to turn off echoing or something like that.  I resorted to
the following hack in my .bash_login:

    echo -n "enter passwd for UNIX_HOME: "
    stty -echo
    read pw
    stty echo
    echo
    if test -n "$pw" ; then
	net use '*' '\\server\service' "$pw" /PERSISTENT:NO
    fi

Plus some more hacks to automagically /delete those mounts on logout
(send mail if interested).
    
| [ssh works, output is visible]

Yes, that is true for interactive sessions.  The `net' command gives
output there, in fact I pipe it through `awk' to get the drive name
which was just allocated, and add that to .bash_logout to disconnect
it.  Works fine so far.

Regards
R'
-- 
Losers spin, winners grin.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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