#24089 - 2002-06-28 11:37 PM
Creating directories with kix
|
ARIPEKA
Fresh Scripter
Registered: 2002-06-28
Posts: 7
|
I want to have my script create home directories on a server(called server01) if the directories don't exist. Then create the share to the directory and map it to a drive. I'm using kix4.10 on a Windows2000 Adv. Server. Can someone help me start . I can't seem to find a command that allows the creation of directories and also, can you use the EXIST command for a directory or is that just for files?
|
|
Top
|
|
|
|
#24090 - 2002-06-28 11:51 PM
Re: Creating directories with kix
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Are you expecting the logon script (running under the user's security context) to create the directory and share? Or are you wanting to write and execute an Admin script to create the directories and shares then have the logon script map the user's home drive?
|
|
Top
|
|
|
|
#24091 - 2002-06-28 11:58 PM
Re: Creating directories with kix
|
ARIPEKA
Fresh Scripter
Registered: 2002-06-28
Posts: 7
|
file system set up like this:
\\server01\users\@userid
I have the "users" directory shared so everyone can create directories. So I'm not sure, do I need to still do this from an admin script?
|
|
Top
|
|
|
|
#24092 - 2002-06-28 11:59 PM
Re: Creating directories with kix
|
ARIPEKA
Fresh Scripter
Registered: 2002-06-28
Posts: 7
|
After I can automate this script to create the directories, then I will change the security settings. Maybe it's easier just to do an admin script and forget about it?
|
|
Top
|
|
|
|
#24093 - 2002-06-29 12:06 AM
Re: Creating directories with kix
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Before we discuss your script, I think you should revist the security model you setup on the server. I do not think it is wise to let the user creat home directories. How do you propose to have the user configure security so that another user's home directory can not be accessed by another? I would recommend that you create the home directory and set permissions properly and correctly setup the home directory in the user acount property before the user uses the account. I do not think you want user's to have permissions to create shares at will on your server either.
If your clients include Win9x/NT4 clients, I would recommend creating a hidden share for each user's home directory.
|
|
Top
|
|
|
|
#24094 - 2002-06-29 12:16 AM
Re: Creating directories with kix
|
ARIPEKA
Fresh Scripter
Registered: 2002-06-28
Posts: 7
|
This is a brand new network, users haven't started using it yet. If I can set permissions and then do the script I want that would be great. Users can create private shares even if the security is set? I'm sorry I'm sounding kind of ign. but I'm new to this.
|
|
Top
|
|
|
|
#24095 - 2002-06-29 12:32 AM
Re: Creating directories with kix
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I think that you need to review some of the deployment guides at Microsoft's website. You should: 1. Create a list of users
2. Automate (script) the creation of the accounts setting the appropriate properties. Search the board for examples.
3. Create the home directories/shares and grant each user access to only his home directory. A user should not have access to another home directory. This can be scripted as well. Again search the board for examples.
4. Setup the balance of your servers file system and public shares.
5. Write a logon script for the users. Again there should be plenty of help on the board. [ 29 June 2002, 00:33: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#24096 - 2002-06-29 12:37 AM
Re: Creating directories with kix
|
ARIPEKA
Fresh Scripter
Registered: 2002-06-28
Posts: 7
|
Well, user accounts are already made and the home directories are already made. I cannot go and redo the entire process, I'll just look through the archives and try to figure out how to create an admin script to perform an if...else directory presence check. Thanks anyways for your time.
|
|
Top
|
|
|
|
#24097 - 2002-06-29 12:39 AM
Re: Creating directories with kix
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
No one is telling you to redo the whole process. Just do what is appropriate based on where you currently are in the process.
|
|
Top
|
|
|
|
#24098 - 2002-06-29 12:43 AM
Re: Creating directories with kix
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
If you already created the home shares you can get a qick list of what was already completed by issuing the following command:
dir \\server\Users /b > homedirs.txt
You can then list all the accounts, compare the two lists and create the remaining home directories.
You then should include this process as part of creating a new user account.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|