* Mounting a network share @ 2015-11-01 21:02 Mike Brown 2015-11-02 1:50 ` Andrey Repin 0 siblings, 1 reply; 12+ messages in thread From: Mike Brown @ 2015-11-01 21:02 UTC (permalink / raw) To: cygwin mail list I'm remotely loggin in to my P box and would lke to mount one of the NAS Samba shares. M$ likes to unmount the share after a period of time, but because it was mounted, the pasword is needed (I hope). When I try the following: mount \\192.168.1.40\Public /cygdrive/p I get an invalid option. Can I do this and if so, what do I need to change to get it to work. Thanks. MB -- e-mail: vidiot@vidiot.com | vidiot@vidiot.net /~\ The ASCII 6082066843@email.uscc.net (140 char limit) \ / Ribbon Campaign Visit - URL: http://vidiot.com/ X Against http://vidiot.net/ / \ HTML Email "What do you say Beckett. Wanna have a baby?" - Castle to Det. Beckett "How long have I been gone?" Alexis after seeing Castle and Beckett w/ baby - Castle - 11/25/13 -- 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Mounting a network share 2015-11-01 21:02 Mounting a network share Mike Brown @ 2015-11-02 1:50 ` Andrey Repin 2015-11-02 5:35 ` Mike Brown ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Andrey Repin @ 2015-11-02 1:50 UTC (permalink / raw) To: Mike Brown, cygwin Greetings, Mike Brown! > I'm remotely loggin in to my P box and would lke to mount one of the NAS > Samba shares. M$ likes to unmount the share after a period of time, > but because it was mounted, the pasword is needed (I hope). > When I try the following: > mount \\192.168.1.40\Public /cygdrive/p > I get an invalid option. > Can I do this and if so, what do I need to change to get it to work. net use //host/resource[/path] P: * /PERSISTENT /SAVECRED P.S. This is not a Cygwin question. If you want to do it from Cygwin side, use fstab and don't use /cygdrive prefix. It is for automatic mounts ONLY. -- With best regards, Andrey Repin Monday, November 2, 2015 04:37:59 Sorry for my terrible english... -- 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Mounting a network share 2015-11-02 1:50 ` Andrey Repin @ 2015-11-02 5:35 ` Mike Brown 2015-11-02 11:16 ` Corinna Vinschen 2015-11-02 16:18 ` Corinna Vinschen 2015-11-02 16:03 ` Mike Brown 2015-11-02 23:37 ` Linda Walsh 2 siblings, 2 replies; 12+ messages in thread From: Mike Brown @ 2015-11-02 5:35 UTC (permalink / raw) To: cygwin On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote: > net use //host/resource[/path] P: * /PERSISTENT /SAVECRED I got the following to be accepted: net use \\192.168.1.40\Public password /user:brown /persistant:yes The syntax doesn't have a place to where it should be mounted. But, if it mounted, I have no idea where. A "df -k" only shows the local drives. > This is not a Cygwin question. > If you want to do it from Cygwin side, use fstab and don't use /cygdrive > prefix. It is for automatic mounts ONLY. I can't find a fstab. MB -- e-mail: vidiot@vidiot.com | vidiot@vidiot.net /~\ The ASCII 6082066843@email.uscc.net (140 char limit) \ / Ribbon Campaign Visit - URL: http://vidiot.com/ X Against http://vidiot.net/ / \ HTML Email "What do you say Beckett. Wanna have a baby?" - Castle to Det. Beckett "How long have I been gone?" Alexis after seeing Castle and Beckett w/ baby - Castle - 11/25/13 -- 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Mounting a network share 2015-11-02 5:35 ` Mike Brown @ 2015-11-02 11:16 ` Corinna Vinschen 2015-11-02 16:18 ` Corinna Vinschen 1 sibling, 0 replies; 12+ messages in thread From: Corinna Vinschen @ 2015-11-02 11:16 UTC (permalink / raw) To: cygwin [-- Attachment #1: Type: text/plain, Size: 858 bytes --] On Nov 1 23:35, Mike Brown wrote: > On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote: > > net use //host/resource[/path] P: * /PERSISTENT /SAVECRED > > I got the following to be accepted: > > net use \\192.168.1.40\Public password /user:brown /persistant:yes > > The syntax doesn't have a place to where it should be mounted. > > But, if it mounted, I have no idea where. A "df -k" only shows the local drives. > > > This is not a Cygwin question. > > If you want to do it from Cygwin side, use fstab and don't use /cygdrive > > prefix. It is for automatic mounts ONLY. > > I can't find a fstab. https://cygwin.com/cygwin-ug-net/using.html#using-pathnames Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat [-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Mounting a network share 2015-11-02 5:35 ` Mike Brown 2015-11-02 11:16 ` Corinna Vinschen @ 2015-11-02 16:18 ` Corinna Vinschen 2015-11-02 16:31 ` Roger Wells 1 sibling, 1 reply; 12+ messages in thread From: Corinna Vinschen @ 2015-11-02 16:18 UTC (permalink / raw) To: cygwin [-- Attachment #1: Type: text/plain, Size: 730 bytes --] On Nov 1 23:35, Mike Brown wrote: > On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote: > > net use //host/resource[/path] P: * /PERSISTENT /SAVECRED > > I got the following to be accepted: > > net use \\192.168.1.40\Public password /user:brown /persistant:yes > > The syntax doesn't have a place to where it should be mounted. I missed that in my reply. It has: net use X: \\server\share when using this command in a Cygwin shell, keep in mind that backslashes need to be escaped in Unix shells: net use X: \\\\server\\share Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat [-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Mounting a network share 2015-11-02 16:18 ` Corinna Vinschen @ 2015-11-02 16:31 ` Roger Wells 0 siblings, 0 replies; 12+ messages in thread From: Roger Wells @ 2015-11-02 16:31 UTC (permalink / raw) To: cygwin On 11/02/2015 11:18 AM, Corinna Vinschen wrote: > On Nov 1 23:35, Mike Brown wrote: >> On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote: >>> net use //host/resource[/path] P: * /PERSISTENT /SAVECRED >> >> I got the following to be accepted: >> >> net use \\192.168.1.40\Public password /user:brown /persistant:yes >> >> The syntax doesn't have a place to where it should be mounted. > > I missed that in my reply. It has: > > net use X: \\server\share > > when using this command in a Cygwin shell, keep in mind that backslashes > need to be escaped in Unix shells: > > net use X: \\\\server\\share or this works: net use x: '\\server\share' (single quotes) > > > Corinna > -- Roger Wells, P.E. leidos 221 Third St Newport, RI 02840 401-847-4210 (voice) 401-849-1585 (fax) roger.k.wells@leidos.com -- 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Mounting a network share 2015-11-02 1:50 ` Andrey Repin 2015-11-02 5:35 ` Mike Brown @ 2015-11-02 16:03 ` Mike Brown 2015-11-02 16:26 ` Corinna Vinschen 2015-11-02 23:37 ` Linda Walsh 2 siblings, 1 reply; 12+ messages in thread From: Mike Brown @ 2015-11-02 16:03 UTC (permalink / raw) To: cygwin On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote: > If you want to do it from Cygwin side, use fstab and don't use /cygdrive > prefix. It is for automatic mounts ONLY. I went and found the Cygwin web page that describes fstab. What it doesn't say is how to use it. I have the following entry: 192.168.1.40:/Public /Public nfs noacl 0 0 But, when I enter "mount /Public" mount complains about not enough options and shows me the help for command line usage. It doesn't appear to look in the fstab file for the entry. I did create /Public, so that path is there. I tried it via the command line and it bitched about /Public. I have no idea what I am doing wrong. MB -- e-mail: vidiot@vidiot.com | vidiot@vidiot.net /~\ The ASCII 6082066843@email.uscc.net (140 char limit) \ / Ribbon Campaign Visit - URL: http://vidiot.com/ X Against http://vidiot.net/ / \ HTML Email "What do you say Beckett. Wanna have a baby?" - Castle to Det. Beckett "How long have I been gone?" Alexis after seeing Castle and Beckett w/ baby - Castle - 11/25/13 -- 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Mounting a network share 2015-11-02 16:03 ` Mike Brown @ 2015-11-02 16:26 ` Corinna Vinschen 2015-11-02 18:06 ` Mike Brown 0 siblings, 1 reply; 12+ messages in thread From: Corinna Vinschen @ 2015-11-02 16:26 UTC (permalink / raw) To: cygwin [-- Attachment #1: Type: text/plain, Size: 875 bytes --] On Nov 2 10:03, Mike Brown wrote: > On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote: > > If you want to do it from Cygwin side, use fstab and don't use /cygdrive > > prefix. It is for automatic mounts ONLY. > > I went and found the Cygwin web page that describes fstab. What it doesn't > say is how to use it. It does: https://cygwin.com/cygwin-ug-net/using.html#mount-table > I have the following entry: > > 192.168.1.40:/Public /Public nfs noacl 0 0 ^^^^^^^^^^^^^^^^^^^^ This syntax isn't known in Windows. Use the same syntax as with SMB shares, just use forward slashes: //192.168.1.40/Public /Public foo binary 0 0 "noacl" has no meaning on NFS shares, btw. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat [-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Mounting a network share 2015-11-02 16:26 ` Corinna Vinschen @ 2015-11-02 18:06 ` Mike Brown 2015-11-02 19:50 ` Andrey Repin 2015-11-03 13:11 ` Corinna Vinschen 0 siblings, 2 replies; 12+ messages in thread From: Mike Brown @ 2015-11-02 18:06 UTC (permalink / raw) To: cygwin On Mon, Nov 02, 2015 at 05:26:51PM +0100, Corinna Vinschen wrote: > On Nov 2 10:03, Mike Brown wrote: > > On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote: > > > If you want to do it from Cygwin side, use fstab and don't use /cygdrive > > > prefix. It is for automatic mounts ONLY. > > > > I went and found the Cygwin web page that describes fstab. What it doesn't > > say is how to use it. > > It does: https://cygwin.com/cygwin-ug-net/using.html#mount-table What I mean is that I was able to create an entry, but I have no idea how to get the mount program to read the contents. > > I have the following entry: > > > > 192.168.1.40:/Public /Public nfs noacl 0 0 > ^^^^^^^^^^^^^^^^^^^^ > > This syntax isn't known in Windows. Use the same syntax as with SMB > shares, just use forward slashes: > > //192.168.1.40/Public /Public foo binary 0 0 > > "noacl" has no meaning on NFS shares, btw. No there no explantion on how to enter a user and password. I tried the nfs syntax because it doesn't require a password. MB -- e-mail: vidiot@vidiot.com | vidiot@vidiot.net /~\ The ASCII 6082066843@email.uscc.net (140 char limit) \ / Ribbon Campaign Visit - URL: http://vidiot.com/ X Against http://vidiot.net/ / \ HTML Email "What do you say Beckett. Wanna have a baby?" - Castle to Det. Beckett "How long have I been gone?" Alexis after seeing Castle and Beckett w/ baby - Castle - 11/25/13 -- 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Mounting a network share 2015-11-02 18:06 ` Mike Brown @ 2015-11-02 19:50 ` Andrey Repin 2015-11-03 13:11 ` Corinna Vinschen 1 sibling, 0 replies; 12+ messages in thread From: Andrey Repin @ 2015-11-02 19:50 UTC (permalink / raw) To: Mike Brown, cygwin Greetings, Mike Brown! >> > > If you want to do it from Cygwin side, use fstab and don't use /cygdrive >> > > prefix. It is for automatic mounts ONLY. >> > >> > I went and found the Cygwin web page that describes fstab. What it doesn't >> > say is how to use it. >> >> It does: https://cygwin.com/cygwin-ug-net/using.html#mount-table > What I mean is that I was able to create an entry, but I have no idea how to > get the mount program to read the contents. Cygwin's fstab only accepts 'bind mounts' (in *NIX terms). The article Corinna mentioned clearly explains that. Another difference from *NIX is that it is read and interpreted by Cygwin core (cygwin1.dll) when a new process tree starts. >> > I have the following entry: >> > >> > 192.168.1.40:/Public /Public nfs noacl 0 0 >> ^^^^^^^^^^^^^^^^^^^^ >> >> This syntax isn't known in Windows. Use the same syntax as with SMB >> shares, just use forward slashes: >> >> //192.168.1.40/Public /Public foo binary 0 0 >> >> "noacl" has no meaning on NFS shares, btw. > No there no explantion on how to enter a user and password. Because there's no such place. The resource must be available to the user. Before we continue this discussion, I suggest to re-read the two paragraphs on the cygwin.com main page. What Cygwin is and it is not. You expect kernel OS functionality from a userland application. That's not how Cygwin works. Cygwin leverages the operating system functionality to create a level field for porting applications to Windows. And to your 'net use' issues, 'net help use' should have been your first stop. Yes, you can just call 'net use <resource>' without specifying the name to simply authenticate yourself with the resource. Mind you, specifying a password in command line is always a bad idea. You never know, where that password would be stored or displayed in between terminal and the called application. -- With best regards, Andrey Repin Monday, November 2, 2015 22:33:09 Sorry for my terrible english... -- 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Mounting a network share 2015-11-02 18:06 ` Mike Brown 2015-11-02 19:50 ` Andrey Repin @ 2015-11-03 13:11 ` Corinna Vinschen 1 sibling, 0 replies; 12+ messages in thread From: Corinna Vinschen @ 2015-11-03 13:11 UTC (permalink / raw) To: cygwin [-- Attachment #1: Type: text/plain, Size: 2618 bytes --] On Nov 2 12:06, Mike Brown wrote: > On Mon, Nov 02, 2015 at 05:26:51PM +0100, Corinna Vinschen wrote: > > On Nov 2 10:03, Mike Brown wrote: > > > On Mon, Nov 02, 2015 at 04:40:33AM +0300, Andrey Repin wrote: > > > > If you want to do it from Cygwin side, use fstab and don't use /cygdrive > > > > prefix. It is for automatic mounts ONLY. > > > > > > I went and found the Cygwin web page that describes fstab. What it doesn't > > > say is how to use it. > > > > It does: https://cygwin.com/cygwin-ug-net/using.html#mount-table > > What I mean is that I was able to create an entry, but I have no idea how to > get the mount program to read the contents. > > > > I have the following entry: > > > > > > 192.168.1.40:/Public /Public nfs noacl 0 0 > > ^^^^^^^^^^^^^^^^^^^^ > > > > This syntax isn't known in Windows. Use the same syntax as with SMB > > shares, just use forward slashes: > > > > //192.168.1.40/Public /Public foo binary 0 0 > > > > "noacl" has no meaning on NFS shares, btw. > > No there no explantion on how to enter a user and password. I tried the nfs > syntax because it doesn't require a password. The Cygwin mount is no actual mount command because it doesn't mount anything. It's not an OS. The mount point in Cygwin is just a translation from DOS to POSIX path as outlined in the documentation. The first field in fstab is basically the underlying Windows path, just with forward slashes. The *actual* mounting, as on Linux, has to be done on the OS level. If you have to attach to a remote drive with username and password, you have to use `net use ...'. In case of NFS mounts you can also (preferredly) use the $SYSTEMROOT\\system32\\mount.exe command which is part of the Windows NFS client installation. Due to this executable name clash between Cygwin mount(1) and NFS mount(1) command, you have to call the latter typically with full path, e.g. $ /cygdrive/c/Windows/System32/mount -h Alternatively, if the mount doesn't require a username/password because the mapping is done in AD or some RFC2307 service(*), just use the SMB-like path (even for NFS) in the Cygwin mount table: //server/share /cygwin-path foo binary 0 0 HTH, Corinna (*) There's also a way to map the anonymous account to a certain uid/gid value using a registry entry: http://blogs.msdn.com/b/sfu/archive/2009/03/27/can-i-set-up-user-name-mapping-in-windows-vista.aspx -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat [-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Mounting a network share 2015-11-02 1:50 ` Andrey Repin 2015-11-02 5:35 ` Mike Brown 2015-11-02 16:03 ` Mike Brown @ 2015-11-02 23:37 ` Linda Walsh 2 siblings, 0 replies; 12+ messages in thread From: Linda Walsh @ 2015-11-02 23:37 UTC (permalink / raw) To: cygwin Andrey Repin wrote: > Greetings, Mike Brown! > >> I'm remotely loggin in to my P box and would lke to mount one of the NAS >> Samba shares. M$ likes to unmount the share after a period of time, >> but because it was mounted, the pasword is needed (I hope). > >> When I try the following: > >> mount \\192.168.1.40\Public /cygdrive/p --- Got to watch out for the those backslashes: This seems to work: > mount //ishtar/tmp /tmp/tmnt mount: defaulting to 'notexec' mount option for speed since native path references a remote share. Use '-f' option to override. /tmp> df /tmp/tmnt Filesystem Size Used Avail Use% Mounted on //ishtar/tmp 12G 8.4G 3.7G 70% /tmp/tmnt Though I'd likely use 'net use' as others mentioned. -- 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-11-03 13:11 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-11-01 21:02 Mounting a network share Mike Brown 2015-11-02 1:50 ` Andrey Repin 2015-11-02 5:35 ` Mike Brown 2015-11-02 11:16 ` Corinna Vinschen 2015-11-02 16:18 ` Corinna Vinschen 2015-11-02 16:31 ` Roger Wells 2015-11-02 16:03 ` Mike Brown 2015-11-02 16:26 ` Corinna Vinschen 2015-11-02 18:06 ` Mike Brown 2015-11-02 19:50 ` Andrey Repin 2015-11-03 13:11 ` Corinna Vinschen 2015-11-02 23:37 ` Linda Walsh
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).