This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cannot see contents of mounted drive


Peter Schroeder wrote:
> local guru. In the meantime, how do I get cygwin to understand that it
> should talk to this drive as "GOLD\ps" not as "ps"? I tried fuzzing
> around with /etc/passwd and /etc/group, but gave up on that and
> removed them again (they were not there to begin with).

Better: Create /etc/passwd and /etc/group by using the tools
mkpasswd and mkgroup and change it according to your needs
(setting home directory and shell). I have attached some more
information about settings in passwd and group files. It's
the README of the `login' package but it describes what is
possible.

> Anyway, my best guess right now is that the reason this doesn't work
> is the distinction between "ps" and "GOLD\ps" when running the cygwin

See below.

> (ls works fine on things such as c:). BTW, the problem is not just
> "ls". I can't "make" either. Though I can run "g++" on a file when
> named explicitly. Similarly "less" works on explicitly given files
> which are known to exist under z:.
> 
> What else can I look for?

You could try to find _any_ reason which could be related to
your access rights.
You could try to run the `getfacl' tool on /cygdrive/z and
post the output.

> Z:\>strace ls
> strace ls
> [...]
> 39951  745814 [main] ls 1178 internal_getlogin: Domain: GOLD
>   426  746240 [main] ls 1178 internal_getlogin: Logon Server: STIBITZ
>   118  746358 [main] ls 1178 internal_getlogin: Windows Username: ps

As you can see in the strace, you are correctly identified as
(Domain: GOLD)\(User: ps).

>   157  746515 [main] ls 1178 lookup_name: name  : ps
> 16598  763113 [main] ls 1178 lookup_name: sid : [6847]

And Cygwin got your SID, too.

>   715 1502278 [main] ls 1178 /cygnus/netrel/src/cygwin-1.1.2/winsup/cygwin/dir.cc:165
> seterrno: 5 (ACCESS_DENIED) -> 13

The above access denied error is produced by a Windows function:

      handle = FindFirstFileA (dir->__d_dirname, &buf);
      if (handle == INVALID_HANDLE_VALUE)
        {
          prior_errno = get_errno ();
          __seterrno ();
	}

with dir->__d_dirname == "."

However, Cygwin itself isn't able to get around that error.

Corinna

-- 
Corinna Vinschen
Cygwin Developer
Cygnus Solutions, a Red Hat company

This is the actual port of `login(1)' to work under Cygwin 1.1.1
with eg. telnetd(8).

On Win9X systems the password authentication is done
via 56 bit DES encrypted passwords in /etc/passwd.
To generate those passwords you can use `crypt.exe'
from the crypt package on the same site or you
copy your encrypted password from your Linux box.

The rest of the description is for NT/W2K.

For usage with NT/W2K security, `login' is patched to allow
login of domain users.
Setting CYGWIN=ntsec is mandatory for that feature.

/etc/passwd and /etc/group have to be created so that
they contain the SIDs of the users and groups. The
new mkpasswd and mkgroup tools since cygwin V1.1.0
create the files that way by default.

Change /etc/passwd either so:

    Change the pw_name field so that it contains the nt-domain
    and the nt-username separated by a backslash:

    domain\user::1104:513:John Doe,S-1-5-21-...

    Disadvantage: You can't see the username in calls to `ls -l'
    anymore because ls shortens the name to 8 characters. Moreover
    you will have to use this long form (domain\user) on the command
    line, eg. in calls to chown(1).

or so:

    The pw_gecos field may contain an additional field, that
    beginns with (upper case!) "U-", followed by the domain
    and the username separated by a backslash. 
    CAUTION: The SID _must_ remain the _last_ field in pw_gecos!!!
    BTW: The field separator in pw_gecos is the comma.
    The username in pw_name itself may be any nice name:

    domuser::1104:513:John Doe,U-domain\user,S-1-5-21-...

    Now you may use `domuser' as your login name with telnet!!!
    This is possible additionally for local users, if you don't like
    your NT login name ;-) You only have to leave out the domain:

    locuser::1104:513:John Doe,U-user,S-1-5-21-...

    Disadvantage: No other field in pw_gecos may begin with "U-".

Please send requests, error reports etc. to the mailing list
cygwin@sourceware.cygnus.com

Have fun,

Corinna Vinschen <vinschen@cygnus.com>
Cygwin Developer
Cygnus Solutions, a Red Hat Company

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]