public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* How to correctly setup passwd and group to access mounted drives?
@ 2008-06-05 13:00 uday
  2008-06-05 16:47 ` Spiro Trikaliotis
  0 siblings, 1 reply; 5+ messages in thread
From: uday @ 2008-06-05 13:00 UTC (permalink / raw)
  To: cygwin

 Hi, 

I am trying this route after failing to find a relevant topic on web or with local gurus. 

Problem in short: 
================= 

I have a folder on a unix server mapped as a windows drive z(y is another drive from 
another unix server). 
I am able to browse through the folders from windows explorer and read/write there. 

I am running into an issue when I access those mapped network drives from cygwin. 
When I try I get the following error message " 
uday_p@uday-xp /cygdrive 
$ ls -l 
total 4 
drwxrwxr-x+ 30 ???????? SYSTEM 0 Jun 3 09:35 c 
drwxr-xr-x 37 uday_p Domain Users 1536 Mar 12 23:34 y 
drwxr-xr-x 36 uday_p Domain Users 1536 May 31 23:58 z 

uday_p@uday-xp /cygdrive 
$ ls y 
ls: reading directory y: Permission denied 

uday_p@uday-xp /cygdrive 
$ ls z 
ls: reading directory z: Function not implemented 

uday_p@uday-xp /cygdrive 
$ 
uday_p@uday-xp ~ 
$ mount 
C:\cygwin\bin on /usr/bin type system (binmode) 
C:\cygwin\lib on /usr/lib type system (binmode) 
C:\cygwin on / type system (binmode) 
c: on /cygdrive/c type system (binmode,noumount) 
y: on /cygdrive/y type system (binmode,noumount) 
z: on /cygdrive/z type system (binmode,noumount) 

uday_p@uday-xp ~ 
$ 
" 

My windows domain is MYDOM 

I did do the mkgroup -l -d MYDOM > /etc/group and 
mkpasswd -u uday_p -p /home -d MYDOM >> /etc/passwd 

I am able to navigate the directories though which means that I do not have the 
group/user id set properly from cygwin. I do not know how to fix that. 

The id on UNIX server is 
" 
unix2 /users/udayb > id -a 
uid=1066(uday_p) gid=2(eng) groups=2(eng),15(crypto) " 

and on cygwin it is 

" 
uday_p@uday-xp /cygdrive 
$ id -a 
uid=264583(uday_p) gid=10513(Domain Users) groups=544(Administrators),545(Users), 
160957(ArchBaseDataGroup),10513(Domain Users),13521(eng),13522(Engineering),29064(LEX.MFG-SUITE.M) 

uday_p@uday-xp /cygdrive 
$ 
" 

I am a developer on unix environment and I have a project where my code from unix server has to 
be compiled from windows (intel ixp stuff). 
Will appreciate any help in getting the access issue fixed. 

I am guessing that it is because of the difference in the gid between unix and on cygwin. I did 
manually modify the entry on cygwin to mirror the value in unix, but that did not help. 

Thanks in advance, 
Uday




--
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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to correctly setup passwd and group to access mounted  drives?
  2008-06-05 13:00 How to correctly setup passwd and group to access mounted drives? uday
@ 2008-06-05 16:47 ` Spiro Trikaliotis
  0 siblings, 0 replies; 5+ messages in thread
From: Spiro Trikaliotis @ 2008-06-05 16:47 UTC (permalink / raw)
  To: cygwin

Hello,

* On Thu, Jun 05, 2008 at 12:59:37PM +0000 uday wrote:
 
> Problem in short: 
> ================= 
> 
> I have a folder on a unix server mapped as a windows drive z(y is another drive from 
> another unix server). 
> I am able to browse through the folders from windows explorer and read/write there. 
> 
> I am running into an issue when I access those mapped network drives from cygwin. 
> When I try I get the following error message " 
> uday_p@uday-xp /cygdrive 
> $ ls -l 
> total 4 
> drwxrwxr-x+ 30 ???????? SYSTEM 0 Jun 3 09:35 c 
> drwxr-xr-x 37 uday_p Domain Users 1536 Mar 12 23:34 y 
> drwxr-xr-x 36 uday_p Domain Users 1536 May 31 23:58 z 
> 
> uday_p@uday-xp /cygdrive 
> $ ls y 
> ls: reading directory y: Permission denied 

I know this behaviour in case when you log on via ssh, and you are using
the passwordless authentication (i.e., public key authentication). In
this case, Windows does not know about your passwords, and you get the
permission denied. This is already known - at least, it was when I
investigated this some years before.

Unfortunately, running "net use \\\\myserver\\myshare /user:myuser" to
enter the password does not work either when you connect via ssh.

Workaround: Use passwords instead of public keys.

So: Are you using these commands "directly" from bash, or are you
remotely connected via ssh?

Best regards,
Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                     http://www.viceteam.org/

--
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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to correctly setup passwd and group to access mounted  drives?
@ 2008-06-05 18:05 uday
  0 siblings, 0 replies; 5+ messages in thread
From: uday @ 2008-06-05 18:05 UTC (permalink / raw)
  To: Eric Berge, Cygwin Mailer list

Hi Eric,

Thanks for the response. 
----- Original Message ----
> From: Eric Berge <emberge@yahoo.com>
> To: cygwin@cygwin.com
> Sent: Thursday, June 5, 2008 10:35:46 PM
> Subject: Re: How to correctly setup passwd and group to access mounted  drives?
> 
> 
> A nice way to check for being the "right" user is to use
> the "whoami" utility - the windows version out in \windows\system32,
> not the cygwin one.  If it displays that you are "sshd_server" things
> are not well.

I installed windows whoami and tried it and see the following result.
uday_p@uday-xp ~
$ /cygdrive/c/Program\ Files/Resource\ Kit/whoami
MYDOM\uday_p

I am in the domain MYDOM.

I hear from other users in my group that this works with older versions of cygwin. I guess I will try that tomorrow.
In the meanwhile, if someone can point out either my / sysad issue, I can fix them.

Thanks and Regards
Uday

> 
> I still do not fully understand the need to do this, but on some
> recent systems I've installed it was necessary to generate the
> groups file with the -u flag to place the user names in the groups
> they belong to.  Perhaps that might help (and perhaps someone with
> more knowledge can comment on the correctness of this suggestion...):
> 
>     mkgroup -l -d -u > /etc/group
> 
> (you can leave off the -d if you're not in a domain)
> 
> -- Eric
> 
> 
> ----- Original Message ----
> From: Spiro Trikaliotis 
> To: cygwin@cygwin.com
> Sent: Thursday, June 5, 2008 11:46:59 AM
> Subject: Re: How to correctly setup passwd and group to access mounted  drives?
> 
> Hello,
> 
> * On Thu, Jun 05, 2008 at 12:59:37PM +0000 uday wrote:
> 
> > Problem in short: 
> > ================= 
> > 
> > I have a folder on a unix server mapped as a windows drive z(y is another 
> drive from 
> > another unix server). 
> > I am able to browse through the folders from windows explorer and read/write 
> there. 
> > 
> > I am running into an issue when I access those mapped network drives from 
> cygwin. 
> > When I try I get the following error message " 
> > uday_p@uday-xp /cygdrive 
> > $ ls -l 
> > total 4 
> > drwxrwxr-x+ 30 ???????? SYSTEM 0 Jun 3 09:35 c 
> > drwxr-xr-x 37 uday_p Domain Users 1536 Mar 12 23:34 y 
> > drwxr-xr-x 36 uday_p Domain Users 1536 May 31 23:58 z 
> > 
> > uday_p@uday-xp /cygdrive 
> > $ ls y 
> > ls: reading directory y: Permission denied 
> 
> I know this behaviour in case when you log on via ssh, and you are using
> the passwordless authentication (i.e., public key authentication). In
> this case, Windows does not know about your passwords, and you get the
> permission denied. This is already known - at least, it was when I
> investigated this some years before.
> 
> Unfortunately, running "net use \\\\myserver\\myshare /user:myuser" to
> enter the password does not work either when you connect via ssh.
> 
> Workaround: Use passwords instead of public keys.
> 
> So: Are you using these commands "directly" from bash, or are you
> remotely connected via ssh?
> 
> Best regards,
> Spiro.
> 
> -- 
> Spiro R. Trikaliotis                              http://opencbm.sf.net/
> http://www.trikaliotis.net/                    http://www.viceteam.org/
> 
> --
> 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/
> 
> 
>       
> 
> --
> 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/



      

--
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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to correctly setup passwd and group to access mounted  drives?
@ 2008-06-05 17:08 Eric Berge
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Berge @ 2008-06-05 17:08 UTC (permalink / raw)
  To: cygwin


A nice way to check for being the "right" user is to use
the "whoami" utility - the windows version out in \windows\system32,
not the cygwin one.  If it displays that you are "sshd_server" things
are not well.

I still do not fully understand the need to do this, but on some
recent systems I've installed it was necessary to generate the
groups file with the -u flag to place the user names in the groups
they belong to.  Perhaps that might help (and perhaps someone with
more knowledge can comment on the correctness of this suggestion...):

    mkgroup -l -d -u > /etc/group

(you can leave off the -d if you're not in a domain)

-- Eric


----- Original Message ----
From: Spiro Trikaliotis <an-cygwin@spiro.trikaliotis.net>
To: cygwin@cygwin.com
Sent: Thursday, June 5, 2008 11:46:59 AM
Subject: Re: How to correctly setup passwd and group to access mounted  drives?

Hello,

* On Thu, Jun 05, 2008 at 12:59:37PM +0000 uday wrote:

> Problem in short: 
> ================= 
> 
> I have a folder on a unix server mapped as a windows drive z(y is another drive from 
> another unix server). 
> I am able to browse through the folders from windows explorer and read/write there. 
> 
> I am running into an issue when I access those mapped network drives from cygwin. 
> When I try I get the following error message " 
> uday_p@uday-xp /cygdrive 
> $ ls -l 
> total 4 
> drwxrwxr-x+ 30 ???????? SYSTEM 0 Jun 3 09:35 c 
> drwxr-xr-x 37 uday_p Domain Users 1536 Mar 12 23:34 y 
> drwxr-xr-x 36 uday_p Domain Users 1536 May 31 23:58 z 
> 
> uday_p@uday-xp /cygdrive 
> $ ls y 
> ls: reading directory y: Permission denied 

I know this behaviour in case when you log on via ssh, and you are using
the passwordless authentication (i.e., public key authentication). In
this case, Windows does not know about your passwords, and you get the
permission denied. This is already known - at least, it was when I
investigated this some years before.

Unfortunately, running "net use \\\\myserver\\myshare /user:myuser" to
enter the password does not work either when you connect via ssh.

Workaround: Use passwords instead of public keys.

So: Are you using these commands "directly" from bash, or are you
remotely connected via ssh?

Best regards,
Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                    http://www.viceteam.org/

--
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/


      

--
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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to correctly setup passwd and group to access mounted  drives?
@ 2008-06-05 17:08 uday
  0 siblings, 0 replies; 5+ messages in thread
From: uday @ 2008-06-05 17:08 UTC (permalink / raw)
  To: Spiro Trikaliotis, cygwin

Hi,

Responses inline at #uday

----- Original Message ----
> From: Spiro Trikaliotis <an-cygwin@spiro.trikaliotis.net>
> To: cygwin@cygwin.com
> Sent: Thursday, June 5, 2008 10:16:59 PM
> Subject: Re: How to correctly setup passwd and group to access mounted  drives?
> 
> Hello,
> 
> * On Thu, Jun 05, 2008 at 12:59:37PM +0000 uday wrote:
> 
> > Problem in short: 
> > ================= 
> > 
> > I have a folder on a unix server mapped as a windows drive z(y is another 
> drive from 
> > another unix server). 
> > I am able to browse through the folders from windows explorer and read/write 
> there. 
> > 
> > I am running into an issue when I access those mapped network drives from 
> cygwin. 
> > When I try I get the following error message " 
> > uday_p@uday-xp /cygdrive 
> > $ ls -l 
> > total 4 
> > drwxrwxr-x+ 30 ???????? SYSTEM 0 Jun 3 09:35 c 
> > drwxr-xr-x 37 uday_p Domain Users 1536 Mar 12 23:34 y 
> > drwxr-xr-x 36 uday_p Domain Users 1536 May 31 23:58 z 
> > 
> > uday_p@uday-xp /cygdrive 
> > $ ls y 
> > ls: reading directory y: Permission denied 
> 
> I know this behaviour in case when you log on via ssh, and you are using
> the passwordless authentication (i.e., public key authentication). In
> this case, Windows does not know about your passwords, and you get the
> permission denied. This is already known - at least, it was when I
> investigated this some years before.
> 
> Unfortunately, running "net use \\\\myserver\\myshare /user:myuser" to
> enter the password does not work either when you connect via ssh.
> 
> Workaround: Use passwords instead of public keys.
> 
> So: Are you using these commands "directly" from bash, or are you
> remotely connected via ssh?
> 

#uday
I have not used ssh or passwords. In this case, they are not needed either. Here is how I have to setup

I have my CVS repository on a unix server that I have to access from cygwin.
I map my private branch as a windows mapped drive (from windows explorer Tools->Map Network Drive...).
This mapped drive shows up as a new drive (in this case "y" and "z").
I am able to browse and read/write into these mapped drives (they do get reflected on unix).

However,
I am not even able to read those folders through cygwin which is vital
because my Intel compiler is usable only through that option.
I am able to navigate the directories through cygwin, but read and write fail.

Thanks
Uday

> Best regards,
> Spiro.
> 
> -- 
> Spiro R. Trikaliotis                              http://opencbm.sf.net/
> http://www.trikaliotis.net/                    http://www.viceteam.org/
> 
> --
> 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/



      

--
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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-05 18:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-05 13:00 How to correctly setup passwd and group to access mounted drives? uday
2008-06-05 16:47 ` Spiro Trikaliotis
2008-06-05 17:08 uday
2008-06-05 17:08 Eric Berge
2008-06-05 18:05 uday

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).