I have a machine, where different users can login with their credentials.
I have an application which gets installed on this machine. Different users login to this application using their individual credentials. As a result, under each users (UserName)\AppData\Roaming a new folder gets created by name DummyData.
When the admin uninstalls this application, I need to delete the DummyData folder created under different logins, if I use %APPDATA% I end up getting current logged in users' AppData folder. Is there a way, I can end up obtaining all the logged in users and if any DummyData folder created under AppData folder so that I can delete all of them.
thanks
Related
I have a data server where users login with there credentials \\myserver.me.com\users\ and then inside it there is a folder for each user e.g Tom-Hanks-user1 is a folder for a user Maggie-Bryan-user2 is another folder for another user and so on. Now when a user login they have access to only their folder but they can still view and see the other users folders but cannot access it. I wonder how I can make the logged in user only see his folder without even seeing the other users folders?
I have a group for my users named my.users and the permissions of this group to the parent folder "users" is shown below:
And below is the permissions for the user Tom Hanks to his folder Tom-Hanks-user1:
But now when user Tom Hanks logins in he have full access to his folder but he can view a folder named Maggie-Bryan-user2 under the users folder, and I wonder how I can disable this where he can view and have access to only his folder and other users folders will not be visible to him?
We are looking to prevent users from accessing a directory we create from our non-sandboxed app via:
FileManager.createDirectory(atPath:withIntermediateDirectories:attributes:) //where path is ~/Library/Application Support/our.bundle.identifier/ourdir
To do this, we have set no permissions for this directory, thus ensuring they cannot open it via:
fileManager.setAttributes([.posixPermissions: 00000], ofItemAtPath: path) //no permissions
However, users can simply right click it, choose Get Info, and change it from No Access for everyone to Read & Write to gain access.
But this isn't the case for other directories I have found. For example, Desktop located at /Users/Guest/ (or any other user account you’re not logged into) also has No Access for everyone, and when you try to change it you’ll get an error:
The operation can’t be completed because you don’t have the necessary permission.
Another difference I see is the Locked checkbox is disabled for that directory, but enabled for the directory our app created.
This is exactly what we need for a directory created by our app. How can we ensure the user does not have permission to change permissions of this directory?
The reason certain folders can't be access is because they're owned by a different user, and the logged-in user doesn't have permissions. But neither will your app given it's running under the user's account. Admin users (which the default macOS account is one) can always change folder ownership and permissions so you're not going to prevent a folder from ever being accessed.
One way of deleting the user profile is to delete the user from the ProfilesList registry key and to delete the user folder from the users directory.
On Windows 8 though this does not seem sufficient. There seems to be some data that is present in HKLM related to the user too. One such example is HKLM\Software\Microsoft\Windows\CurrentVersion\Appx\'UserSid'.
Hence i'm looking for an API (Win32 SDK), that would delete all the filesystem and registry entries related to the User Profile?
I need some help in understanding a problem. Here is the scenario. We have a windows domain controller machine and several machines in that domain. (Everything in windows 2008). In one of the machines in that domain (machine name AlphaSiter) our own custom java based product is installed. To log on into our product, you have to provide a user/password combo which is validated against the active directory. Now here is the scenario.
Log into the domain controller and create a user (say David) in the active directory and set the “User must change password in next login option”.
Go to the machine called AlphaSiter where our custom product is installed and try to login to our product with the newly created user credentials and then change password successfully.
The side affect is that in the AlphaSiter machine in C:\Users the user folder is created..that is c:\Users\David. Also this folder is only created if at the time of user creation the “User must change password in next login option” is set. This user folder is not created if the option is unchecked. We are not creating the folder programmatically from our code. So I am wondering how this folder is getting created.Is it something that windows does internally?
Any help on this would be appreciated as I have to give explanation to our customer ---:)
The user's profile folder is always created when there is some profile information that needs to be stored. It may be some registry settings in HKCU hive.
You can use RegMon to track regitry activity.
I'd like to access a Fileserver (NAS) through my ASP.NET MVC Application and can't find a way to do that in a correct way.
What I've done so far is:
Created a User with Read/Write permissions on a directory on my NAS
Created a virtual directory on my IIS Server that is connected to the nas directory with the previously defined usercredentials
Now if I navigate to my virtual directory (AppliCationIPAdress/NAS) I get automaticaly redirected to \NASIPAdress\My\Directory. On the NAS loginnotifications I get the info, that somewone connected to my directory with the given credentials => That is how it should be
But if I access the NAS directory trough my MVC application (no matter if i use the UNC or the virtual directory redirection) i get an access denied erromessage and in the NAS loginnotifications there is not listed my prepared useraccount but my webserver as user who tried to login.
var dirName = Server.MapPath("~/NAS/Dir/");
ViewBag.Message = System.IO.Directory.GetFiles(dirName );
Could someone please explain why that is happening and what I have to do if i want to access files on a fileservice throuh my mvc application?
You have to give the service account rights to access the filearea, or run the app with a user that has rights
What worked for was:
Have same user account and password in NAS and IIS Server.
Create an application pool for your web app or use the default app pool and change the user account to the same mentioned before. Steps:
Go To IIS Manager
Click on Application Pools
Right click on the app pool assigned to your web app and select Advanced settings...
In section Process Model change the Identity field to the user account mentioned above.
Click on the 3 dots button located at the right of the field
Select Custom account and click on Set... button
Set username, password and password confirmation (same user account mentioned above.
Hope it helps!
FranciscoG