delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/05/10/18:05:17

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
X-IronPortListener: Outbound_SMTP
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvEAAI21yU2cKEcV/2dsb2JhbACXW44xd6tlm1OGDwSUMoo5
From: "Buchbinder, Barry (NIH/NIAID) [E]" <BBuchbinder AT niaid DOT nih DOT gov>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>,
"'Len Giambrone'" <Len DOT Giambrone AT intersystems DOT com>
Date: Tue, 10 May 2011 18:04:56 -0400
Subject: RE: determining what user mounted a drive
Message-ID: <0105D5C1E0353146B1B222348B0411A209E8030CCD@NIHMLBX02.nih.gov>
References: <20110510212510 DOT C80AD9D5A0C AT mail2 DOT intersystems DOT com>
In-Reply-To: <20110510212510.C80AD9D5A0C@mail2.intersystems.com>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Len Giambrone sent the following at Tuesday, May 10, 2011 5:25 PM
>Is there a way of determining with what user credentials a share was
>mounted? I suppose I could touch a file on the drive and then find out
>who the owner is, but that's not ideal.
>
>mount will tell me that it's a user mount, but won't tell me WHICH user.
>
>Is there some way (windows native or Cygwin) of getting this
>information?

I do not know but here is a guess.  Wouldn't any user mount be that of
the current user?  Isn't that the point of user mounts - I only see my
own?  And if I'm root, I only see system mounts?

And if you want to see the user mounts of individual users, according to
the UG <http://cygwin.com/cygwin-ug-net/using.html#mount-table>, that
should be in </etc/fstab.d/user_name>.

Otherwise, what about the following?
$ stat -c %U /mount_point

But if you are talking about, something that happened before a cygwin
process was lanched, I think you want to use the word "mapped", not
"mounted" and I can't say much more than that.

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019