| 1 | #!/usr/bin/env python
|
|---|
| 2 | """
|
|---|
| 3 | ntlogon.py written by Timothy (rhacer) Grant
|
|---|
| 4 |
|
|---|
| 5 | Copyright 1999 - 2002 by Timothy Grant
|
|---|
| 6 |
|
|---|
| 7 | is distributed under the terms of the GNU Public License.
|
|---|
| 8 |
|
|---|
| 9 | The format for the configuration file is as follows:
|
|---|
| 10 |
|
|---|
| 11 | While there is some room for confusion, we attempt to process things in
|
|---|
| 12 | order of specificity: Global first, Group second, User third, OS Type
|
|---|
| 13 | forth. This order can be debated forever, but it seems to make the most
|
|---|
| 14 | sense.
|
|---|
| 15 |
|
|---|
| 16 | # Everything in the Global section applies to all users logging on to the
|
|---|
| 17 | # network
|
|---|
| 18 | [Global]
|
|---|
| 19 | @ECHO "Welcome to our network!!!"
|
|---|
| 20 | NET TIME \\\\servername /SET /YES
|
|---|
| 21 | NET USE F: \\\\servername\\globalshare /YES
|
|---|
| 22 |
|
|---|
| 23 | # Map the private user area in the global section so we don't have to
|
|---|
| 24 | # create individual user entries for each user!
|
|---|
| 25 | NET USE U: \\\\servername\\%U /YES
|
|---|
| 26 |
|
|---|
| 27 | # Group entries, User entries and OS entries each start with the
|
|---|
| 28 | # keyword followed by a dash followed by--appropriately enough the Group
|
|---|
| 29 | # name, the User name, or the OS name.
|
|---|
| 30 | [Group-admin]
|
|---|
| 31 | @ECHO "Welcome administrators!"
|
|---|
| 32 | NET USE G: \\\\servername\\adminshare1 /YES
|
|---|
| 33 | NET USE I: \\\\servername\\adminshare2 /YES
|
|---|
| 34 |
|
|---|
| 35 | [Group-peons]
|
|---|
| 36 | @ECHO "Be grateful we let you use computers!"
|
|---|
| 37 | NET USE G: \\\\servername\\peonshare1 /YES
|
|---|
| 38 |
|
|---|
| 39 | [Group-hackers]
|
|---|
|
|---|