How to correctly setup passwd and group to access mounted drives?

View: New views
2 Messages — Rating Filter:   Alert me  

How to correctly setup passwd and group to access mounted drives?

by Bugzilla from uday_p@yahoo.co.uk :: Rate this Message:

| View Threaded | Show Only this Message

 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/


Re: How to correctly setup passwd and group to access mounted drives?

by Spiro Trikaliotis-12 :: Rate this Message:

| View Threaded | Show Only this Message

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/