[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 659
  • Last Modified:

Under which username am I connected to a shared folder?

With the command 'net use' I can see which connections are made to other shared folders.
How can I see under which username I am connected to each of these shared folders?

Some more catchwords:
credentials, 'Log in as', 'Connect using a different user name';'shared drives'; 'network drive'

The reason:
for my question ist that I connect from one PC to several shared folders on various servers.
Sometimes I have no write access to a shared folder because i am already connected to this folder under a user name that has less access rights, maybe only the right to read. Now I would like to see which user name this is.
0
sunrise79
Asked:
sunrise79
  • 9
  • 4
  • 3
  • +3
1 Solution
 
Jay_Jay70Commented:
Hi sunrise79,

check under computer management - shared folders - sessions  or shares   may help?

Cheers!
0
 
Naser GabajCommented:
0
 
Dushan De SilvaCommented:
You can try following dos commands.
net sessions
net share

Or you can see those from computer managemant.

BR Dushan
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
scdavisCommented:
Sun,

First - you can't connect to \\Server1\share1 with Username1 and \\Server1\share2 with Username2.  It just isn't done.

Second - there are two sets of permissions, "SHARE" and "FILE SYSTEM".  Consider them "most restrictive".  Whatever is most restrictive is what you get.  

Third -- then consider it in the context of username-specificity.  I.e. if your account is in GROUPA, but your username is specificied, the more granular, i.e. user settings trump the group(s) you might be in.




It's ugly, I know.  Just test it.  Experiment, tinker and test until you've verified the rights you desire.

Best.
Scott.






0
 
sunrise79Author Commented:
Hey all, thanks for your suggestions! Here my comments:

The link http://www.experts-exchange.com/Operating_Systems/WinXP/Q_21780915.html#16238764 lead to

- computer management - shared folders - open files
  shows the files and the !!USER NAME!! that has access to the file

This 'user name' is what I'm looking for, but I am on the client, not on the server. And I am not an administrator of the server.

Maybe som other ideas?
0
 
Jay_Jay70Commented:
thats what i posted up the top here ^^^^^
0
 
Dark_KingCommented:
"The reason:
for my question ist that I connect from one PC to several shared folders on various servers.
Sometimes I have no write access to a shared folder because i am already connected to this folder under a user name that has less access rights, maybe only the right to read. Now I would like to see which user name this is."

Why do it this way, if it not working you already now you connect with wrong user.

Make 2 .bat (command) files one call Sread.bat and one Swrite.bat

Beginning in this 2 files you use the flag “/DELETE” to close all mapped shares , then
you map with right user to have WRITE or only READ.

In this case you only run the batfile you want to fix it.
0
 
Naser GabajCommented:
OK, then let's try this amazing tool from sysinternals

http://www.sysinternals.com/Utilities/AccessEnum.html

It will show you each network path you have and what kind of permission you have (Read/Write).

Good luck

Naser
0
 
Naser GabajCommented:
Ohh sorry that will show you only what permission assigned to each folder but not as per your request who is logged on.

Here is what it will fit your need:

http://www.sysinternals.com/Utilities/PsLoggedOn.html

Good luck

Naser
0
 
Dark_KingCommented:
Yes you can do that.

if you type this from CMD

wmic netuse

and you can pipe it to a txt file to read it easy
wmic netuse > c:\shareuser.txt
0
 
Dark_KingCommented:
And you can run”wmic” in Interactive mode to
From CMD type this
START "Windows Management" WMIC

In WMIC windows type these lines
/locale:ms_409
netuse

And to close this windows type quit
0
 
Dark_KingCommented:
Not shore WMIC is included with XP home edition if not you cold use this
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=C174CFB1-EF67-471D-9277-4C2B1014A31E
0
 
Dark_KingCommented:
And I notice you have hard to explain it is the user you use on share not how using your share.
My examples do watt you ask fore.
0
 
sunrise79Author Commented:
Hi Naser
AccessEnum is a nice tool but does not fulfill my needs, but PsLoggedOn maybe is the one I looked for. But I've to try it first.

Hi Dark King
even if I think you choosed an awful nickname I thank you for your tip.
As you assumed 'wmic' is not part of XP home edition. Your link only works for Win NT4.0, not for XP home edition.
0
 
Dark_KingCommented:
No problem, you can install “WMIC” on XP home.

You need “Windows XP SP2” installation file.
Download it from Microsoft
http://www.microsoft.com/downloads/details.aspx?DisplayLang=en&FamilyID=049c9dbe-3b8e-4f30-8245-9e368d3cdb5a

Save this batch script as “Iwmic.bat” without this two line with “***”

************Script beginning************
@echo off
if (%1)==() goto HILFE
%1 /passive /x:%temp%
expand.exe "%temp%\I386\cimwin32.mf_" "%windir%\system32\wbem\cimwin32.mfl"
expand.exe "%temp%\I386\cimwin32.mo_" "%windir%\system32\wbem\cimwin32.mof"
expand.exe "%temp%\I386\cli.mo_" "%windir%\system32\wbem\cli.mof"
expand.exe "%temp%\I386\cliegali.mf_" "%windir%\system32\wbem\cliegaliases.mfl"
expand.exe "%temp%\I386\cliegali.mo_" "%windir%\system32\wbem\cliegaliases.mof"
expand.exe "%temp%\I386\csv.xs_" "%windir%\system32\wbem\csv.xsl"
expand.exe "%temp%\I386\hform.xs_" "%windir%\system32\wbem\hform.xsl"
expand.exe "%temp%\I386\htable.xs_" "%windir%\system32\wbem\htable.xsl"
expand.exe "%temp%\I386\mof.xs_" "%windir%\system32\wbem\mof.xsl"
expand.exe "%temp%\I386\policman.dl_" "%windir%\system32\wbem\policman.dll"
expand.exe "%temp%\I386\provthrd.dl_" "%windir%\system32\wbem\provthrd.dll"
expand.exe "%temp%\I386\rawxml.xs_" "%windir%\system32\wbem\rawxml.xsl"
expand.exe "%temp%\I386\rsop.mo_" "%windir%\system32\wbem\rsop.mof"
expand.exe "%temp%\I386\texttbl.xs_" "%windir%\system32\wbem\texttable.xsl"
expand.exe "%temp%\I386\textvalu.xs_" "%windir%\system32\wbem\textvaluelist.xsl"
expand.exe "%temp%\I386\wmic.ex_" "%windir%\system32\wbem\wmic.exe"
expand.exe "%temp%\I386\wmicookr.dl_" "%windir%\system32\wbem\wmicookr.dll"
expand.exe "%temp%\I386\wscenter.mo_" "%windir%\system32\wbem\wscenter.mof"
expand.exe "%temp%\I386\xml.xs_" "%windir%\system32\wbem\xml.xsl"
expand.exe "%temp%\I386\xslmap.xm_" "%windir%\system32\wbem\xsl-mappings.xml"
rd /s /q "%temp%\i386"
goto OVER
:HILFE
echo.
echo *** You need Service-Pack2-EXE on this Script. Thanks. ***
pause
:OVER

************Script end************

Put this “Iwmic.bat” file in same dir as your “XP SP2 exe” file and run it from CMD like this.

Iwmic.bat WindowsXP-KB835935-SP2-ENU.exe

Change EXE name to match your file name if different, this while extract all file needed to run WMIC

To start CMD window you type CMD under Start > Run

And sorry if my name is scary, it has followed me sometime now.
0
 
Dark_KingCommented:
And you can do lot more with this command.
http://www.ss64.com/nt/wmic.html
0
 
Naser GabajCommented:
Keith,

>>but PsLoggedOn maybe is the one I looked for. But I've to try it first.

Don't you think it's too early to take such decision as the asker need more time to try it

Also, your recommendation doesn't include my answer ??Why?

Instead, I suggest Split between both of us.
0
 
Dark_KingCommented:
PsLoggedOn and stuff like that is for server side or to se who using your share.
sunrise79  ask help to se watt user he using connecting to a share.

I have tested MY example on XP Home and it work nice, you se all share you connected to and username login to this share.
0
 
Dark_KingCommented:
I realize this question is rare; someone needs to know, what user he has used, to connect to a share from the same local computer, which made this connection.

I have searched a lot on this and I can’t find any program that’s making that, and I remember using wmic on a local thing like that, and find it has the flag netuse.

To install this on XP home there is only twenty files from SP2 needed to get this working.
0
 
Jay_Jay70Commented:
pslogged on is good but it doesnt do what is asked by the author, Keith has made a perfectly good reccomendation as far as i can see, i have played with psloggedon and it only shows who is logged on - as far as i know that program taps into the sessions and reports back per machine... same as doing it manally on each machine
0
 
sunrise79Author Commented:
Thanks you all for the great support.
The WMIC Tool exactly fulfiulled my needs on Windows XP home!
sunrise 79
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 9
  • 4
  • 3
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now