Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 27 Jun 2003 11:27:01 +1000 (EST) From: luke DOT kendall AT cisra DOT canon DOT com DOT au Subject: Network shares under ssh: some can, some can't To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: TEXT/plain; CHARSET=US-ASCII Message-Id: <20030627012701.934E934C59@nevin.research.canon.com.au> I noticed some discussion on the list a while back, where people reported that if they logged in remotely to their Windows PC via slogin, they didn't have access to their network shares. I'd never worried too much about this, since I always just manually mapped the drives. Today I also modified our local /etc/profile.d/cisra.sh to automatically do this for you, since drives you normally map do show up (as "Unavailable") in a "net use". For me, it worked well. For someone else, it doesn't. Me: : [luke AT nevin] .../luke; slogin doyle luke AT doyle's password: Last login: Fri Jun 27 10:10:13 2003 from nevin.research.canon.com.au Fanfare!!! You are successfully logged in to this server!!! Logged in via ssh: now restoring any network connections The command completed successfully. The command completed successfully. The command completed successfully. The command completed successfully. The command completed successfully. Setting OFFICE_PATH (if MS Office is installed) ... /cygdrive/c/Program Files/Microsoft Office/Office10/ Running .profile Setting up for bash Setting up GNU environment Setting up for CVS Setting up Visual C vars Other person: linn> ssh riada Warning: Remote host denied X11 forwarding. Last login: Fri Jun 27 09:35:30 2003 from linn.research.canon.com.au Fanfare!!! You are successfully logged in to this server!!! Logged in via ssh: now restoring any network connections Enter the user name for 'samba': System error 1223 has occurred. The operation was canceled by the user. The password is invalid for \\samba\install\win32. Enter the user name for 'Samba': System error 1223 has occurred. The operation was canceled by the user. The password is invalid for \\Samba\rmills. Enter the user name for 'handel': System error 1223 has occurred. The operation was canceled by the user. The password is invalid for \\handel\d. -bash: office_path: No such file or directory Running .profile Setting up for bash RIADA> It doesn't matter whether I'm logged in on my PC doyle at the console too, or not. I can do "net use X: '\\handel\d'" and have it work correctly in either case. Could it be because I have PowerUser/Admin privileges on my PC? luke PS: For your enjoyment, here are the local profile mods to auto map (for some people!) their normal network shares: # # When logged in via ssh, normally mapped drives are listed as Unavailable, # so build a "net use ?: path" command for each of them. # This doesn't work if done as an eval or a . for some reason, it has # to be written into a separate script and executed. # if [ ! -z "$SSH_CONNECTION" ] then echo "Logged in via ssh: now restoring any network connections" net use | \ sed -n "s/^Unavailable[ ]*\(.:\)[ ]*\(.*\\\[^ ]*\) *Microsoft Windows Network/net use \1 '\2'/p" \ > /tmp/net-restore$$ sh /tmp/net-restore$$ rm -f /tmp/net-restore$$ fi -- 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/