Page 1 of 1 1
Topic Options
#24089 - 2002-06-28 11:37 PM Creating directories with kix
ARIPEKA Offline
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 [Smile] . 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 Offline
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?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#24091 - 2002-06-28 11:58 PM Re: Creating directories with kix
ARIPEKA Offline
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 Offline
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 Offline
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#24094 - 2002-06-29 12:16 AM Re: Creating directories with kix
ARIPEKA Offline
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 Offline
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#24096 - 2002-06-29 12:37 AM Re: Creating directories with kix
ARIPEKA Offline
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 Offline
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#24098 - 2002-06-29 12:43 AM Re: Creating directories with kix
Howard Bullock Offline
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#24099 - 2002-07-03 03:30 PM Re: Creating directories with kix
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
The solution I am using is as follows. If a new suer logs into the domain and the suer's personal directory does not exist I write a notice into an .INI file of structure:
code:
[New Users]
UserID1=1
UserID2=1

I am running a maintenance client script (see Kixtart Systems Management Server which checks this .INi file for the particular server and then creates the personal folder and copys required files into it. It also sets appropriate permissions and creates a hidden share. the next day, when the new user logs in again, the user gets mapped to the personal directory.

An inprovement would be to have 'watch code' running on that server that gets triggered and creates the personal directory when the new user logs in. I believe there is already code posted illustrating this approach.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 756 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.072 seconds in which 0.034 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org