#210657 - 2015-09-01 12:58 PM
Delete file from all users except the user logging on?
|
Philzip
Just in Town
Registered: 2015-09-01
Posts: 3
Loc: Germany
|
Hey all!
First of all, please excuse my language. English is not my native language, but I guess you'll be able to understand me.
In our system, every user needs a certificate to sign in to a specific system.
These certificates are unique and every user must not use a certificate of another user.
This is what we got: Everytime a user logs on, a certificate is copied from a shared folder of the server to C:\users\username\.
But if one of our coworkers signs in at another computer, he has access to the certificates of all people who signed in at this station previously. (everyone has local administrator privileges - we need that because of the software we use)
My idea is the following script:
Every time you log on, every local certificate (at c:\users\) shall be deleted except the one from the user who is signing in at this moment.
Is this possible? If yes, how?
Thank you very much!
Regards from Germany
Phil
Edited by Philzip (2015-09-01 01:00 PM)
|
|
Top
|
|
|
|
#210661 - 2015-09-01 02:36 PM
Re: Delete file from all users except the user logging on?
[Re: Lonkero]
|
Philzip
Just in Town
Registered: 2015-09-01
Posts: 3
Loc: Germany
|
For a solution hack, you can use dir to list all user folders with dir() and if %userprofile% does not match delete the file. This you can run in logon, log off or scheduled script.
Sounds interesting. Unfortunately I have no idea how to realize the code.
Can you help me?
|
|
Top
|
|
|
|
#210662 - 2015-09-01 02:38 PM
Re: Delete file from all users except the user logging on?
[Re: Lonkero]
|
Philzip
Just in Town
Registered: 2015-09-01
Posts: 3
Loc: Germany
|
If the certs are user specific, how could another user use them? Are they installed in local system store instead of personal store of the user?
They are not installed, they're just files you need to logon to that certain system. Its from my development coworkers, I don't know how it works. I just manage the servers and I need to solve their request.
|
|
Top
|
|
|
|
#210680 - 2015-09-02 06:29 PM
Re: Delete file from all users except the user logging on?
[Re: Lonkero]
|
BradV
Seasoned Scripter
  
Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
|
I just meant delete the files within the directory, not any folders.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 302 anonymous users online.
|
|
|