Batch Process to Create and Grant Access to Home DirectoriesID: Q155449
|
When administrators need to create large numbers of users and corresponding home directories, the task can be simplified by using a batch process rather than creating each home directory individually through Windows NT File Manager or Windows NT Explorer.
Here is an example of a batch process that will create the home directory
and the share, and will assign permissions. This example uses RMTSHARE,
from the Windows NT 3.51 Resource Kit.
md c:\users\<username>
rmtshare \\<HomeServer>\<username>$=c:\users\<username>
/grant <username>:f /grant administrator:f
/remove everyone
RMTSHARE \\server
\\server\sharename
\\server\sharename=drive:path [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/GRANT [user[:perm][ /GRANT user[:perm]]]]
[/REMOVE user]
\\server\sharename=printername /PRINTER [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/GRANT [user[:perm][ /GRANT user[:perm]]]]
[/REMOVE user]
\\server\sharename [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/GRANT [user[:perm][ /GRANT user[:perm]]]]
[/REMOVE user]
\\server\sharename /DELETE
Additional query words: security login logon home dir rmtshare.exe reskit 4.0
Keywords : kbenv kbnetwork ntdomain
Version : WinNT:3.5,3.51
Platform : winnt
Issue type : kbinfo
Last Reviewed: January 19, 1999