Re: Network drives ssh access
On Sep 3 14:08, Quanah Gibson-Mount wrote: --On Friday, September 03, 2010 12:28 PM -0700 Quanah Gibson-Mount wrote: --On Tuesday, August 24, 2010 1:35 PM -0700 Quanah Gibson-Mount wrote: The CIFS mount now uses the same username/password as the windows user. I have used passwd -R to store the user's password in the registry. The drive again shows up when launching cygwin manually, and it still fails to show up when I use ssh to connect. $ net use New connections will be remembered. [...] The command completed successfully. So, mounting it works ok if I do it manually via ssh. But why isn't it simply showing up when it's already mounted on the system, and the credentials have been stored via passwd -R? The login via ssh is another session. The Windows mounts are only stored on a per-session base. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Network drives ssh access
--On Saturday, September 04, 2010 11:30 AM +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: The login via ssh is another session. The Windows mounts are only stored on a per-session base. I thought the point of using passwd -R is so that when you log in to a new session, the drive gets automatically mounted... In any case, I modified my .bashrc to mount the drive if it detects an SSH session. --Quanah -- Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc Zimbra :: the leader in open source messaging and collaboration -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Network drives ssh access
On Sep 4 11:12, Quanah Gibson-Mount wrote: --On Saturday, September 04, 2010 11:30 AM +0200 Corinna Vinschen corinna-cyg...@cygwin.com wrote: The login via ssh is another session. The Windows mounts are only stored on a per-session base. I thought the point of using passwd -R is so that when you log in to a new session, the drive gets automatically mounted... No, the idea is to use password authentication under the hood and thus get a valid user token with all permissions and credentials the user has when logging in on the console. It does not mean that all automatisms of the GUI are available, too. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Network drives ssh access
--On Tuesday, August 24, 2010 1:35 PM -0700 Quanah Gibson-Mount wrote: --On Tuesday, August 24, 2010 1:19 PM -0400 Larry Hall (Cygwin) wrote: A missing password is likely your problem, since that's at the heart of your original problem really. But I actually wasn't thinking of this option as the solution to your problem when I pointed you at the FAQ. Running a service as the user you'll log in as is really just a workaround. I was thinking more of: http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3 Using the passwd -R bit did not change the behavior. I still am unable to access the network share when logging in via SSH, but it works just fine when starting cygwin locally. I will note that the network share (CIFS) uses a different username/password than my local user/password on the windows box (That, unfortunately, is not under my control). However, I set up the share using net use \\IP\share /savecreds, and that does mount the drive to Windows at least every time without prompting, and Cygwin locally is able to use it. It is only an issue with the SSH connection. The CIFS mount now uses the same username/password as the windows user. I have used passwd -R to store the user's password in the registry. The drive again shows up when launching cygwin manually, and it still fails to show up when I use ssh to connect. --Quanah -- Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc Zimbra :: the leader in open source messaging and collaboration -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Network drives ssh access
--On Friday, September 03, 2010 12:28 PM -0700 Quanah Gibson-Mount wrote: --On Tuesday, August 24, 2010 1:35 PM -0700 Quanah Gibson-Mount wrote: The CIFS mount now uses the same username/password as the windows user. I have used passwd -R to store the user's password in the registry. The drive again shows up when launching cygwin manually, and it still fails to show up when I use ssh to connect. $ net use New connections will be remembered. Status Local RemoteNetwork --- Unavailable Z:\\10.137.242.250\Zbuild3 Microsoft Windows Network The command completed successfully. $ net use Z: '\\10.137.242.250\Zbuild3' The command completed successfully. $ net use New connections will be remembered. Status Local RemoteNetwork --- OK Z:\\10.137.242.250\Zbuild3 Microsoft Windows Network The command completed successfully. So, mounting it works ok if I do it manually via ssh. But why isn't it simply showing up when it's already mounted on the system, and the credentials have been stored via passwd -R? It was also mounted using /savecred --Quanah -- Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc Zimbra :: the leader in open source messaging and collaboration -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Network drives ssh access
--On Monday, August 23, 2010 9:41 PM -0400 Larry Hall (Cygwin) reply-to-list-only...@cygwin.com wrote: On 8/23/2010 7:47 PM, Quanah Gibson-Mount wrote: I have a network drive set up to auto-reconnect at startup, which appears to work fine. If I start cygwin after logging in, I can see the drive in the /cygwin directory. However, I cannot see the drive in the /cygwin directory when connecting via Cygwin's OpenSSH. My guess is that ssh starts before the drive shows up. Running net use from the SSH connection says it is unavailable: snip The FAQ is your friend: http://cygwin.com/faq/faq-nochunks.html#faq.using.shares Thanks, I missed that, was reading the fstab etc pages. So I set up sshd to run as the build user, but it still doesn't work: I ran: cygrunsrv.exe -R sshd confirmed no sshd processes were running rebooted, confirmed no sshd processes were running Ran: ssh-host-config -u build to set it up to run as the build user (my primary user) Told it to use privilege separation Said I want sshd to run as a service Put ntsec tty as the values for the CYGWIN environment variable Ran cygrunsrv -S sshd ps -eaf now shows sshd running as SYSTEM proc 3376 with parent 3340, and a subprocess sshd 3444 running as build user I log in as the build user via ssh, and ps -eaf shows me to sshd process running as SYSTEM - proc 3376 with parent 3340 and a subprocess 1824 with 3376 as the parent. So, in reading the further documents, is what I need to do then is change the SYSTEM entry in /etc/passwd to use the SID of the build user instead? --Quanah -- Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc Zimbra :: the leader in open source messaging and collaboration -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Network drives ssh access
--On Tuesday, August 24, 2010 9:59 AM -0700 Quanah Gibson-Mount qua...@zimbra.com wrote: I log in as the build user via ssh, and ps -eaf shows me to sshd process running as SYSTEM - proc 3376 with parent 3340 and a subprocess 1824 with 3376 as the parent. Specifically, when logging in via remote ssh, both processes were owned by SYSTEM. So the bit to run as the build user apparently doesn't actually work. --Quanah -- Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc Zimbra :: the leader in open source messaging and collaboration -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Network drives ssh access
On 8/24/2010 1:03 PM, Quanah Gibson-Mount wrote: --On Tuesday, August 24, 2010 9:59 AM -0700 Quanah Gibson-Mount qua...@zimbra.com wrote: I log in as the build user via ssh, and ps -eaf shows me to sshd process running as SYSTEM - proc 3376 with parent 3340 and a subprocess 1824 with 3376 as the parent. Specifically, when logging in via remote ssh, both processes were owned by SYSTEM. So the bit to run as the build user apparently doesn't actually work. A missing password is likely your problem, since that's at the heart of your original problem really. But I actually wasn't thinking of this option as the solution to your problem when I pointed you at the FAQ. Running a service as the user you'll log in as is really just a workaround. I was thinking more of: http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3 -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Network drives ssh access
--On Tuesday, August 24, 2010 1:19 PM -0400 Larry Hall (Cygwin) reply-to-list-only...@cygwin.com wrote: A missing password is likely your problem, since that's at the heart of your original problem really. But I actually wasn't thinking of this option as the solution to your problem when I pointed you at the FAQ. Running a service as the user you'll log in as is really just a workaround. I was thinking more of: http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3 Using the passwd -R bit did not change the behavior. I still am unable to access the network share when logging in via SSH, but it works just fine when starting cygwin locally. I will note that the network share (CIFS) uses a different username/password than my local user/password on the windows box (That, unfortunately, is not under my control). However, I set up the share using net use \\IP\share /savecreds, and that does mount the drive to Windows at least every time without prompting, and Cygwin locally is able to use it. It is only an issue with the SSH connection. --Quanah -- Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc Zimbra :: the leader in open source messaging and collaboration -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Network drives ssh access
On 8/24/2010 4:35 PM, Quanah Gibson-Mount wrote: --On Tuesday, August 24, 2010 1:19 PM -0400 Larry Hall (Cygwin) wrote: ^^ http://cygwin.com/acronyms/#PCYMTNQREAIYR We don't encourage feeding spammers. A missing password is likely your problem, since that's at the heart of your original problem really. But I actually wasn't thinking of this option as the solution to your problem when I pointed you at the FAQ. Running a service as the user you'll log in as is really just a workaround. I was thinking more of: http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3 Using the passwd -R bit did not change the behavior. I still am unable to access the network share when logging in via SSH, but it works just fine when starting cygwin locally. I will note that the network share (CIFS) uses a different username/password than my local user/password on the windows box (That, unfortunately, is not under my control). However, I set up the share using net use \\IP\share /savecreds, and that does mount the drive to Windows at least every time without prompting, and Cygwin locally is able to use it. It is only an issue with the SSH connection. Well, that's a completely different thing then. You need Windows to authenticate that share as the other user then. I think you're stuck with net use option of the FAQ. You can either invoke it each time you log in via ssh, put it in your favorite rc file, or have a separate script to do it (which you'd invoke each time). -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Network drives ssh access
--On Tuesday, August 24, 2010 4:49 PM -0400 Larry Hall (Cygwin) wrote: However, I set up the share using net use \\IP\share /savecreds, and that does mount the drive to Windows at least every time without prompting, and Cygwin locally is able to use it. It is only an issue with the SSH connection. Well, that's a completely different thing then. You need Windows to authenticate that share as the other user then. I think you're stuck with net use option of the FAQ. You can either invoke it each time you log in via ssh, put it in your favorite rc file, or have a separate script to do it (which you'd invoke each time). I've yet to get net use to work for me via cygwin. net use Z: \\W.X.Y.Z\Share password tries to prompt me with a question: Z: has a remembered connection to \\W.X.Y.Z\Share. Do you want to overwrite the remembered connection? (Y/N) [Y]: No valid response was provided I.e., it never gives me the opportunity to answer the question. If I try changing the drive letter, I get error 67, the network name cannot be found. Note that net use by itself continues to show the Unavailable status for the Z: drive with that share. --Quanah -- Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc Zimbra :: the leader in open source messaging and collaboration -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Network drives ssh access
On 8/24/2010 4:57 PM, Quanah Gibson-Mount wrote: --On Tuesday, August 24, 2010 4:49 PM -0400 Larry Hall (Cygwin) wrote: However, I set up the share using net use \\IP\share /savecreds, and that does mount the drive to Windows at least every time without prompting, and Cygwin locally is able to use it. It is only an issue with the SSH connection. Well, that's a completely different thing then. You need Windows to authenticate that share as the other user then. I think you're stuck with net use option of the FAQ. You can either invoke it each time you log in via ssh, put it in your favorite rc file, or have a separate script to do it (which you'd invoke each time). I've yet to get net use to work for me via cygwin. net use Z: \\W.X.Y.Z\Share password tries to prompt me with a question: Z: has a remembered connection to \\W.X.Y.Z\Share. Do you want to overwrite the remembered connection? (Y/N) [Y]: No valid response was provided I.e., it never gives me the opportunity to answer the question. If I try changing the drive letter, I get error 67, the network name cannot be found. Note that net use by itself continues to show the Unavailable status for the Z: drive with that share. Specifying the needed user name may help. Otherwise, remove the saved credentials and specify the user name and password directly when you invoke the command. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Network drives ssh access
On Tue, Aug 24, 2010 at 3:57 PM, Quanah Gibson-Mount wrote: --On Tuesday, August 24, 2010 4:49 PM -0400 Larry Hall (Cygwin) wrote: I've yet to get net use to work for me via cygwin. net use Z: \\W.X.Y.Z\Share password Use forward slash or escape the back-slashes. So, you'd try net use Z: //W.X.Y.Z/Share password or net use Z: W.X.Y.Z\\Share password Backslash is the escape character for bash. -Jason -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Network drives ssh access
I have a network drive set up to auto-reconnect at startup, which appears to work fine. If I start cygwin after logging in, I can see the drive in the /cygwin directory. However, I cannot see the drive in the /cygwin directory when connecting via Cygwin's OpenSSH. My guess is that ssh starts before the drive shows up. Running net use from the SSH connection says it is unavailable: bu...@zre-win-002 / $ net use New connections will be remembered. Status Local RemoteNetwork --- Unavailable Z:\\X.X.X.X\Zbuild3 Microsoft Windows Network The command completed successfully. From the system itself: bu...@zre-win-002 / $ net use New connections will be remembered. Status Local RemoteNetwork --- OK Z:\\X.X.X.X\Zbuild3 Microsoft Windows Network The command completed successfully. Trying to run net use Z: doesn't help any. Any ideas on what I can do to make this drive show up so I can access it when accessing the windows box remotely? Thanks, Quanah -- Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc Zimbra :: the leader in open source messaging and collaboration -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: Network drives ssh access
On 8/23/2010 7:47 PM, Quanah Gibson-Mount wrote: I have a network drive set up to auto-reconnect at startup, which appears to work fine. If I start cygwin after logging in, I can see the drive in the /cygwin directory. However, I cannot see the drive in the /cygwin directory when connecting via Cygwin's OpenSSH. My guess is that ssh starts before the drive shows up. Running net use from the SSH connection says it is unavailable: snip The FAQ is your friend: http://cygwin.com/faq/faq-nochunks.html#faq.using.shares -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple