jimmy_2k Posted October 21, 2021 Posted October 21, 2021 Hi all I've been trying to grant full access to our students home folders by using an icacls script I found on the internet below. This script creates the text file with the folder names which match the usernames, but the final step doesn't take place and the script won't add the users to their respective folders. I wondered if this was due Server 2019 preventing it? @echo off REM Create list of folders dir /a:d /b E:\HomeFolders\B20 >C:\temp\usersB20.txt REM Read each line from just created text file... for /f "tokens=*" %%G in (C:\temp\usersB20.txt) do ( REM ...and set ownership for each folder icacls "E:\HomeFolders\B20\%%G" /setowner "yggg.internal\%%G" echo. )
DaveTheTech Posted October 21, 2021 Posted October 21, 2021 I hav always used takeown to take ownership of files and folders.
Davit2005 Posted October 21, 2021 Posted October 21, 2021 How are you doing your homefolders, is it via the Profile tab in the users AD account object. This will not work if you are using hidden shares but on a test user simply update the home folder to \\Server\HomeFolderShare\%Username% Not tried this under 2019 however and it depends on the existing permissions on the shared folder. The last time I did this was with 2012 R2 over 7 years back.
DavR Posted October 21, 2021 Posted October 21, 2021 It's a bit old now, and I've not used it in a while, but NTFSFix was always a really useful tool for adding %username% permissions on folders. https://wisedataman.com/ntfsfix
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now