marsmail-0.2c
This commit is contained in:
parent
3cc84d97d2
commit
d665510635
339
COPYING
Normal file
339
COPYING
Normal file
@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
13
README
Normal file
13
README
Normal file
@ -0,0 +1,13 @@
|
||||
Please see marsmail.doc for installation information.
|
||||
|
||||
Authors: Gert Cronje: gac@eng.rau.ac.za
|
||||
Anton de Wet: adw@obsidian.co.za
|
||||
Eddie Dunckley: eddie@eng.rau.ac.za
|
||||
Francois Wolmarans: fwo@eng.rau.ac.za
|
||||
|
||||
Modification for Natural Netware Mail by:
|
||||
Guillermo Dominguez A: guido@lux.labinf.uaa.mx
|
||||
|
||||
Please contact Eddie for bug reports in the scripts, etc.etc.
|
||||
|
||||
Please contact Guido for bug report on marsmail.pas (Natural Netware Mail).
|
293
marsmail.doc
Normal file
293
marsmail.doc
Normal file
@ -0,0 +1,293 @@
|
||||
Marsmail ver 0.2c GNU-GPL by EL GUIDO <guido@lux.labinf.uaa.mx> - UAA
|
||||
& Eddie Dunckley & Gert Cronje of RAU Engineering.
|
||||
the c is for the charon mail queue emulation
|
||||
---------------- bug reports:guido@lux.labinf.uaa.mx
|
||||
|
||||
Marsmail ver 0.2 GNU-GPL by Eddie Dunckley & Gert Cronje of RAU Engineering.
|
||||
---------------- bug reports:eddie@eng.rau.ac.za gac@chopin.rau.ac.za
|
||||
|
||||
--------- (License)
|
||||
This whole package is licensed under the GNU Public License.
|
||||
See the file COPYING for details.
|
||||
---------
|
||||
|
||||
Marsmail is a pascal frontend for mail that translates the
|
||||
unix mailfile into smaller files that pegasus mail understands.
|
||||
|
||||
--------- (Added)
|
||||
This version doesn't need the unix2dos application for marsmail (works alone)
|
||||
---------
|
||||
|
||||
Please examine all the files carefully as this is not a commercial
|
||||
program suite, it's freeware. Written by staff/students for students..
|
||||
--------- (And now, teachers for teachers too. )
|
||||
|
||||
file list:
|
||||
----------
|
||||
327 Feb 4 11:53 marsmail.doc The marsmail-02c doc file
|
||||
8608 Feb 4 11:48 marsmail.exe dos executable to convert mail
|
||||
5480 Feb 4 12:51 marsmail.pas dos sources for marsmail c release
|
||||
1430 Feb 4 13:32 monlan Basic monitor for LAN/WAN
|
||||
12051 Feb 4 13:12 newuser.pl Process the user application
|
||||
3757 Feb 4 12:50 nomasteruser deletes users with cleanup
|
||||
4080 Feb 4 11:32 ohbirthcheck birthday reminder script
|
||||
793 Feb 4 11:34 ohexpiry expire accounts on mars/samba
|
||||
13141 Feb 4 13:18 ohform.htm User application form for Mars server
|
||||
1296 Feb 4 11:35 ohlogscr.bat modified supervisor login script
|
||||
690 Feb 4 09:32 ohmail automatic mail notifier start script
|
||||
6648 Feb 4 10:50 ohmasteruser creates new users with extra features
|
||||
1381 Feb 4 09:27 ohmessage automatic mail notifier main script
|
||||
---------------- (This is no longer needed)
|
||||
#1046 Feb 4 09:33 ohpostme handles posting from pegasus to unix
|
||||
---------------- (End)
|
||||
3585 Feb 4 10:35 ohquota Disk quota accounting automated
|
||||
856 Feb 4 09:34 ohsendnt Console broadcast script
|
||||
1954 Feb 4 11:45 pmail.bat front-end dos batch file for pmail
|
||||
8161 Feb 4 11:48 pmdflts.ini pmail defaults for all users
|
||||
1024 Feb 4 11:48 pmgate.sys USER defined gateway via pconfig
|
||||
859 Feb 4 11:00 wwwhomepage Creates homepages for new users.
|
||||
|
||||
what's new
|
||||
----------
|
||||
|
||||
pmail.bat script dosn't need unix2dos anymore, the marsmail have an better
|
||||
readline logic that understand the unix lines. (EL GUIDO)
|
||||
----------
|
||||
|
||||
marsmail read directly from the user's spool mail, don't need make copies.
|
||||
----------
|
||||
|
||||
marsmail let the unix mail directly into the user's mail directories on novell
|
||||
----------
|
||||
|
||||
marsmail uses a Charon alike Print Queue for mail output
|
||||
----------
|
||||
|
||||
Lot's of automation....
|
||||
Lot's of new ideas ie birthday reminders, expiry scripts etc etc
|
||||
Better docs
|
||||
|
||||
Procedure:
|
||||
----------
|
||||
Take a deep breath and realize that there is no install script.
|
||||
Make sure your mars is running successfully and dos users can log into
|
||||
the server with normal novell client software. Make sure your directory
|
||||
layout for Mars looks simmular to the one listed in this document. Get a good
|
||||
editor for linux to edit the scripts to suite your company's needs. Get
|
||||
the pegasus mail program from one of it's mirror sites.
|
||||
Unpack and follow it's install method.
|
||||
|
||||
----------- (This is obsolete)
|
||||
#DON't use pegasus's bindery features to fetch mail in the
|
||||
#SYS:\mail locations. This requires a mercury.nlm that cannot run on linux.
|
||||
----------- (New Feature)
|
||||
The marsmail-02c needs the bindery features to work, this is the natural mail
|
||||
on Netware. The SYS:\mail\<userid> must exist.
|
||||
There is no mercury, but the Charon Mail Queue Emulation works fine! :-)
|
||||
-----------
|
||||
|
||||
----------- (The pop solution)
|
||||
You can attempt using the pmpop utilities for dos to fetch mail via pop from
|
||||
the server, (which might have been the best possible solution if it worked),
|
||||
but there is a seperate project to edit the ini file on the fly for multiple
|
||||
users....
|
||||
----------- (My comments)
|
||||
I didn't investigated about this, but someone reading this could :-))
|
||||
-----------
|
||||
|
||||
----------- (This is obsolete too!)
|
||||
#Make sure you map drive I: to the user's home directory (or change the
|
||||
#scripts). I've used a map root i:=sys:\home\%name% to do this in the
|
||||
#master mars login script that can be created with syscon.
|
||||
----------- (New Feature)
|
||||
The volumes required for this new c release are:
|
||||
Volume Route Drive
|
||||
-------- ----------- -------
|
||||
SYS -> route/SYS F:
|
||||
...others... route/<VOL> (G: , H: , I: , etc)
|
||||
HOME -> ~ (G: , H: , I: , etc)
|
||||
-----------
|
||||
|
||||
Start by examining each script carefully - there is a lot of undocumented
|
||||
features in them...
|
||||
|
||||
----------- (This os more obsolete!!!)
|
||||
#Then start by editing the pmdflts.ini to suite your needs.
|
||||
#Use the one included as a template. Read the pmail docs carefully.
|
||||
----------- (New Feature)
|
||||
Just install the pmail suite and reconfigure the gateway (see this part next).
|
||||
-----------
|
||||
|
||||
----------- (This is important!!!)
|
||||
Link your unix mailboxes into your mars SYS
|
||||
volume space i.e. ln -s /var/spool/mail /<route>/SYS/unixmail
|
||||
(but the 0.99pl1 do it in a different way)
|
||||
-----------
|
||||
|
||||
----------- (This Changed)
|
||||
Run pconfig to create a SMTP gateway. Use the name of a Print Queue defined on the
|
||||
/etc/nwserv like a charon mail queue.
|
||||
-----------
|
||||
|
||||
----------- (This is for the SMTP gateway)
|
||||
|
||||
Select: Pegasus Mail/DOS Configuration v3.11
|
||||
SMTP Gateway
|
||||
|
||||
____+--------------- Mercury / Charon SMTP Interface ---------------+_____
|
||||
___ ¦ ¦_____
|
||||
___ ¦ Spool Interface? : [N ] ¦+____
|
||||
___ ¦ Queue Name? : CHARON ¦¦____
|
||||
___ ¦ Enabled? : Y ¦¦____
|
||||
___ ¦ Prefered? : N ¦¦____
|
||||
___ ¦ Use always? : N ¦¦____
|
||||
___ ¦ This server's name : your.name.org.contry ¦¦____
|
||||
___ ¦ Our time zone : GMT +/- #num ¦¦____
|
||||
___ ¦ Organization : organization's name ¦¦____
|
||||
___ ¦ ¦¦____
|
||||
___ ¦ The name you want placed in the Organization header of ¦¦____
|
||||
___ ¦ outgoing message. Use this to identify your site more ¦¦____
|
||||
___ ¦ clearly in your email. ¦+____
|
||||
___ +---------------------------------------------------------------+_____
|
||||
___ ______
|
||||
|
||||
---------- (This is for the Charon alike emulation)
|
||||
Declare a Print Queue on the /etc/nwserv.conf like this:
|
||||
|
||||
21 CHARON SYS:/PRINT/O /usr/sbin/mailout
|
||||
|
||||
The mailout is a executable (755 mode) file with this line:
|
||||
|
||||
# File that emulate the Charon Mail Gateway
|
||||
(sed "1,3d" | /usr/sbin/sendmail -t)
|
||||
#End of file
|
||||
-----------
|
||||
|
||||
----------- (This is very important!!)
|
||||
Check if your unixmail is secure i.e. mars users cannot read each others mail.
|
||||
This can be done by loggin in from a dos box with different user names and
|
||||
trying to view the sys:\unixmail\%name% files
|
||||
-----------
|
||||
|
||||
Edit the pmail.bat to suite your needs.
|
||||
|
||||
----------- (This is more more obsoleted !!!)
|
||||
#Make sure the drive mappings is correct.
|
||||
#i.e. I: maps to userdir.
|
||||
----------- (New Feature)
|
||||
Just need the SYS:/mail drive mapping correct
|
||||
-----------
|
||||
|
||||
Compile the marsmail.pas to suite your needs if needed.
|
||||
|
||||
----------- (Ahooommmm, more obsolted !!!)
|
||||
#Test to see if you can read mail from pegasus and that the gateway places
|
||||
#outgoing messages in i:\pmail\out.
|
||||
-----------
|
||||
|
||||
----------- (This is no more used !!!)
|
||||
#Edit the ohpostme scripts until it posts mail out for your users.
|
||||
#This can be tested by posting a message with pmail, seeing if a file is created
|
||||
#in i:\pmail\out, and waiting for ohpostme to visit the directory, removing and
|
||||
#posting the file.
|
||||
-----------
|
||||
|
||||
----------- (This was no tested !!!)
|
||||
Deploy (!) the ohmail and ohmessage scripts to run out of rc.local or however
|
||||
you prefer. See if it notifies the user when new mail arrives.... You can
|
||||
tail -f the log files to see what is happening. A note on samba notification:
|
||||
the message gets sent to a machine instead of a user.
|
||||
|
||||
Decide if you want to use the new adduser script called ohmasteruser and
|
||||
nomasteruser for creating users and destroying users on a mars aware unix
|
||||
server. MAKE BACKUPS of your original passwd files etc before continueing.
|
||||
Note this new adduser creates /etc/expiry /etc/birthdays /etc/ohmyusers
|
||||
/etc/ohmaillist
|
||||
|
||||
Remove users from ohmaillist to prevent them from mailing
|
||||
Remove users from expiry to prevent account expiry
|
||||
Remove users from birthdays to prevent birthday notification
|
||||
|
||||
Please note the change to passwd file:
|
||||
|
||||
auser:x:505:512:A dummy user:/hamster/home/./auser:/etc/ftponly
|
||||
|
||||
The extra dot after home forces ftp to see this as the root, thus
|
||||
allowing the ftp to enter ../httpd/html/auser via the link. Note that
|
||||
/app or unixmail cannot be reached via ftp.
|
||||
----------- (No tested)
|
||||
|
||||
----------- (This is no more needed (hope) !!!)
|
||||
#Edit your mars's net$log.dat in SYS:\public to exit to the extended login
|
||||
#script ohlogscr.bat that actually creates the users with a default password
|
||||
#on the mars server. Modify the wwwhomepage script to create homepages for
|
||||
#your new users.
|
||||
----------- (the work is just ....)
|
||||
Edit your mars's net$log.dat adding this two lines to the end
|
||||
|
||||
DOS SET ID=%USER_ID%
|
||||
DOS SET LN=%LOGIN_NAME%
|
||||
-----------
|
||||
|
||||
----------- (this was untouched)
|
||||
You might need to either install quotas or remove mentioning of quotas from
|
||||
the scripts.
|
||||
|
||||
Customize the ohform.htm to your needs and decide if you would like to use it
|
||||
as a user application form from the web. The apache server can run on the
|
||||
same server as mars.... ohform.htm calls newuser.pl that creates a script file
|
||||
to ease the user creation. newuser.pl sends mail to admin user to inform him
|
||||
of the new application.
|
||||
|
||||
|
||||
These scripts can handle shadow passwords. Create a blank file /etc/ftponly
|
||||
and use this dummy shell for users to prevent them from telnetting to the
|
||||
server. Mail fetching via pop and ftp will continue to work.
|
||||
|
||||
Suggested directory structure for good operation...
|
||||
|
||||
/apps
|
||||
/base
|
||||
/base/SYS (mars server SYS volume)
|
||||
/base/SYS/unixmail ln -s /var/spool/mail /base/SYS/unixmail
|
||||
/base/SYS/apps ln -s /apps /base/SYS/apps
|
||||
/base/SYS/home ln -s ../home home
|
||||
/base/home base home directories
|
||||
/base/home/auser (Yip, the user's home dir)
|
||||
/base/home/auser/www ln -s ../httpd/html/dummyuser www
|
||||
/base/home/auser/pmail gets created from /etc/skel used for pmail
|
||||
/base/home/httpd/html Web server root space
|
||||
/base/home/httpd/html/main non-user related space.
|
||||
/base/home/httpd/html/auser (user's www space)
|
||||
|
||||
You can now even share the apps, home dirs and unixmail with samba and you've
|
||||
got a complete novell and nt server all in one, sharing the same space!
|
||||
|
||||
If you find ANY errors with this doc or missing files please let me know...
|
||||
---------- (Untouched)
|
||||
|
||||
---------- (This is just for fun)
|
||||
#The marsmail is just a dirty hack to satisfy the dos users. Stick with
|
||||
#pop3 or imap to fetch mail via tcpip from win95, os2, wfw, linux and other.
|
||||
#The other stuff included with marsmail is just to automate as much as possible
|
||||
#for our poor overworked netadmins!
|
||||
---------- (My opinion)
|
||||
The marsmail-02c is a ver hard work to improve the resources and the time on
|
||||
the sessions with dos users, based on the marsmail-02 (thanxs a lot boys), but
|
||||
with a lot of new features, hawever have the principal trouble on marsmail:
|
||||
the user can use only one mail reader (pmail or pine), never both in a time.
|
||||
|
||||
New features:
|
||||
a) easy of install (a very few steps)
|
||||
b) reads mail in the netware natural mode
|
||||
c) output mail in the natural CHARON mode
|
||||
|
||||
Changes:
|
||||
a) The ohpostme go to the trash
|
||||
b) the oh* scripts still in test (don't know if works)
|
||||
|
||||
Future: (the one or the scond, but not the two)
|
||||
a) ask to PMAIL worktime to make a PMAIL that work with spool files
|
||||
b) improve the mail read for read only the new mail for pmail
|
||||
and return the undeleted mail to the spool (both readers)
|
||||
----------
|
BIN
marsmail.exe
BIN
marsmail.exe
Binary file not shown.
33
marsmail.pas
33
marsmail.pas
@ -3,6 +3,7 @@ uses dos;
|
||||
|
||||
var mailfile, numfile, outfile: text;
|
||||
number, miline, moline, sl, slc: string; {mail-in, mail-out}
|
||||
UserId,UserLn: string; {mail dir on netware}
|
||||
nfile, odir, mfile: string; {numberfile, output dir, mailfile}
|
||||
numbint: longint;
|
||||
o, code, mi, i,j: integer; {mailindex}
|
||||
@ -24,12 +25,33 @@ begin
|
||||
FileExists := (IOResult = 0) and (FileName <> '');
|
||||
end; { FileExists }
|
||||
|
||||
Function ReadLine(var ReadFile: Text): String;
|
||||
var
|
||||
C: Char;
|
||||
S: String;
|
||||
O: boolean;
|
||||
Begin
|
||||
O:=False;
|
||||
S:='';
|
||||
If Not EOF(ReadFile) Then Repeat
|
||||
{$I-}
|
||||
Read(readfile,c);
|
||||
{$I+}
|
||||
If EOF(ReadFile) Or (Ioresult <> 0) Or (C = #10) then
|
||||
O:=True
|
||||
Else
|
||||
S:=S+C;
|
||||
Until O;
|
||||
ReadLine:=S;
|
||||
End;
|
||||
|
||||
Begin
|
||||
v:=false;
|
||||
nfile:='i:\pmail\in\numfile';
|
||||
mfile:='i:\pmail\in\mailfile.dos';
|
||||
odir:='i:\pmail\in';
|
||||
UserId:=GetEnv('ID');
|
||||
UserLn:=GetEnv('LN');
|
||||
nfile:='F:\mail\'+UserId+'\numfile';
|
||||
mfile:='F:\unixmail\'+UserLn;
|
||||
odir:='F:\mail\'+UserId;
|
||||
for i:=1 to paramcount do
|
||||
begin
|
||||
sl:=paramstr(i);
|
||||
@ -41,6 +63,7 @@ begin
|
||||
if (pos('/?',sl)=1) or (pos('/H',sl)=1) or (pos('/HELP',sl)=1) then
|
||||
begin
|
||||
Writeln('Copyright 1996/9 Dud software');
|
||||
Writeln(' Modifications by EL GUIDO');
|
||||
Writeln;
|
||||
Writeln('Purpose: Creates *.cnm files from a unix mail file for Pegasus');
|
||||
Writeln('Usage: marsmail.exe [/n=x:\numb\file] [/m=y:\mail\file]');
|
||||
@ -121,7 +144,8 @@ end;
|
||||
|
||||
while not eof(mailfile) do
|
||||
begin
|
||||
readln(mailfile,miline);
|
||||
{readln(mailfile,miline); this was the problem, the next is the solution}
|
||||
miline:=readline(mailfile);
|
||||
if v then write(mi,':');
|
||||
prevline:=shortline;
|
||||
shortline:=false;
|
||||
@ -171,4 +195,3 @@ end;
|
||||
writeln(' ');
|
||||
if v then writeln('Program finished.');
|
||||
end. {of program}
|
||||
|
||||
|
64
monlan
Executable file
64
monlan
Executable file
@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Monlan can monitor some of your network resources and inform you
|
||||
# about failures...
|
||||
#
|
||||
|
||||
FLT=0
|
||||
MLOG='/var/log/unitrace.log'
|
||||
LLOG='/var/log/unilast.log'
|
||||
MACHINE=lc.labinf.uaa.mx
|
||||
PARTOFIP=148.211
|
||||
|
||||
if [ ! -f $MLOG ]; then
|
||||
touch $MLOG
|
||||
fi
|
||||
|
||||
while /bin/true; do
|
||||
touch $LLOG
|
||||
NOW=`date`
|
||||
FLT=0
|
||||
DNSFLT=0
|
||||
|
||||
# Reset last log entry
|
||||
echo "Last error: " > $LLOG
|
||||
|
||||
# check for nslookup failures
|
||||
/usr/bin/nslookup $MACHINE | grep '$PARTOFIP' 2>&1 > /dev/null
|
||||
if [ $? -eq 1 ]; then
|
||||
ER="Name lookups on our domain failed on $NOW. "
|
||||
echo "$ER" >> $MLOG
|
||||
echo "$ER" >> $LLOG
|
||||
FLT=1
|
||||
DNSFLT=1
|
||||
fi
|
||||
#echo "Fault status $FLT"
|
||||
if [ "$FLT" = "0" ] ; then
|
||||
# echo "Nslookup is well" ;
|
||||
for l in machine_list ;
|
||||
# i.e. rauteg misty raulink rau3 ing1 rkw info raulink caesar.wits.ac.za shannon.ee.wits.ac.za hippo.ru.ac.za ;
|
||||
do
|
||||
# echo "Pinging $l"
|
||||
/bin/ping $l -c 5 -n | grep '100%' 2>&1 > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
ER="Cannot ping $l on $NOW. Possible cable fault or machine failure?"
|
||||
echo "$ER" >> $MLOG
|
||||
echo "$ER" >> $LLOG
|
||||
FLT=1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
# Alerter code....
|
||||
|
||||
if [ "$FLT" = "1" ]; then
|
||||
if [ "$DNSFLT" = "0" ] ; then
|
||||
echo "." >> $LLOG
|
||||
cat $LLOG | /bin/mail -s "Network failure" netadmin@your.site.name
|
||||
sleep 240
|
||||
fi
|
||||
FLT=0
|
||||
DNSFLT=0
|
||||
fi
|
||||
sleep 900 ;
|
||||
done
|
||||
|
360
newuser.pl
Executable file
360
newuser.pl
Executable file
@ -0,0 +1,360 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# New user script
|
||||
#
|
||||
# This script gets called from a web form where users apply for usership
|
||||
# on your server. It creates a executable file that you as admin can
|
||||
# just run and the user gets created without headaches.
|
||||
|
||||
$| = 1;
|
||||
|
||||
if ($ENV{'REQUEST_METHOD'} eq 'POST')
|
||||
{
|
||||
|
||||
$base="/hamster/home";
|
||||
|
||||
|
||||
chop($date = `date`);
|
||||
chop($ddd = `date +\%j\%H\%M`);
|
||||
print "Content-type: text/html\n\n";
|
||||
print <<"HTML";
|
||||
<HTML>
|
||||
<TITLE>New user details completed</TITLE>
|
||||
<BODY BACKGROUND=/yourown.gif>
|
||||
<IMG SRC="/yourlogo.gif" ALT="MY OWN LOGO" HEIGHT=114 WIDTH=640><BR>
|
||||
<H1>New User Application</H1>
|
||||
HTML
|
||||
|
||||
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
|
||||
@pairs=split(/&/, $buffer);
|
||||
foreach $pair(@pairs)
|
||||
{
|
||||
($name, $value) = split(/=/, $pair);
|
||||
$value =~ tr/+/ /;
|
||||
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
||||
$contents{$name} = $value;
|
||||
$contents{'remoteip'} = $ENV{'REMOTE_ADDR'};
|
||||
# print "$contents{$name} = $value <BR>\n";
|
||||
}
|
||||
# Check if some-one gave in a bullshit form.
|
||||
if (($contents{'fname'} eq '') or ($contents{'sname1'} eq ''))
|
||||
{
|
||||
print <<"HTML";
|
||||
<HR>
|
||||
Dear person working from machine or proxy $ENV{'REMOTE_ADDR'}, do WE have some
|
||||
news for you: <P>
|
||||
|
||||
Oh boy! You cannot even complete a form! How do you think it makes you look?
|
||||
At least fill in a Full name and one username, else this form is useless! <P>
|
||||
|
||||
Please take some time and consider if you are <I>really</I> capable of using a
|
||||
computer and if you <I>should</I> apply for usership.
|
||||
If your previous attempt to fill in a form turned out like this
|
||||
then we do not consider you a good canidate.
|
||||
Take a deep breath.
|
||||
|
||||
Use your browsers BACK button and
|
||||
try again!
|
||||
<HR>
|
||||
</BODY>
|
||||
</HTML>
|
||||
HTML
|
||||
exit;
|
||||
}
|
||||
else { ; }
|
||||
print <<"HTML";
|
||||
Thank you for taking the time to complete the form. Please read the following
|
||||
information carefully. Use your browsers save function to save this page to
|
||||
a file. It will act as a receipt of your new (possible) user account.<P>
|
||||
|
||||
If we think that the IP $contents{'remoteip'} that you appear to work from is
|
||||
not in our domain, extra effort will be made to ensure that
|
||||
you are in fact a valid applicant.<P>
|
||||
|
||||
<P> This is how your details will appear to others:
|
||||
<CENTER><TABLE BORDER=1 WIDTH=80%>
|
||||
<TR><TD> Name </TD><TD>
|
||||
$contents{'fname'}
|
||||
HTML
|
||||
|
||||
if ($contents{'addtitle'} eq 'addmytitle')
|
||||
{
|
||||
print <<"HTML";
|
||||
,$contents{'title'}
|
||||
HTML
|
||||
}
|
||||
else
|
||||
{ ; }
|
||||
|
||||
print <<"HTML";
|
||||
$contents{'fname'}
|
||||
</TD></TR>
|
||||
<TR><TD>
|
||||
Office</TD><TD>$contents{'office'}</TD></TR>
|
||||
<TR><TD>Username choices:</TD><TD><B>$contents{'sname1'}</B>,
|
||||
<B>$contents{'sname2'}</B> or <B>$contents{'sname3'}</B> </TD></TR>
|
||||
<TR><TD>Work Tel: $contents{'wtel'}</TD><TD>Home Tel: $contents{'htel'}</TD></TR>
|
||||
<TR><TD>Stud/ID number:</TD><TD> $contents{'idnum'}</TD></TR>
|
||||
<TR><TD>Birthdate:</TD><TD> $contents{'bidate'}</TD></TR>
|
||||
</TABLE></CENTER><P>
|
||||
|
||||
You will most probably granted the first choice of username, unless it clashes
|
||||
with an existing name, is too short or too close to a swearing word.
|
||||
<B><P>PLEASE PHONE netadmin at 555-5555 to arrange a password for your account</B>
|
||||
|
||||
$contents{'reff'} is your reference person or study leader that will be
|
||||
contacted at email address <B>$contents{'refmail'}</B>.
|
||||
Your account might be stopped if the reference person does not know you or give us a good reason to do so.</B><P>
|
||||
|
||||
Reason why you would like to be a network user:
|
||||
<QUOTE>$contents{'whyi'}</QUOTE><P>
|
||||
You rate yourself a $contents{'skill'} computer user that will be using
|
||||
$contents{'os'} as your primary operating system. You also have some knowlage on
|
||||
$contents{'oos1'} $contents{'oos2'} $contents{'oos3'} $contents{'oos4'}
|
||||
$contents{'oos5'} $contents{'oos6'} $contents{'oos7'} $contents{'oos8'}
|
||||
$contents{'oos9'}<P>
|
||||
Please read the section on operating systems carefully to give you a broader understanding on how to connect to the network.
|
||||
HTML
|
||||
|
||||
if ($contents{'helpme'} eq 'yes')
|
||||
{
|
||||
print <<"HTML";
|
||||
You are also interrested in giving a helping hand with network related problems. <B>Good!</B> As soon as there is a problem near you, <I>you</I> will be seen as the
|
||||
solution. We'll keep in touch.
|
||||
HTML
|
||||
|
||||
}
|
||||
else
|
||||
{ ; }
|
||||
|
||||
print <<"HTML";
|
||||
<P> Your feedback on the questionaire will be stored in a database for future
|
||||
refference. These details will give us direction on how to expand the network
|
||||
services.
|
||||
<P> You rate the following services:
|
||||
<CENTER><TABLE BORDER=1 WIDTH=80%}
|
||||
<TR><TD>E-Mail and other communication tools: </TD><TD>$contents{'s1'}</TD></TR>
|
||||
<TR><TD>WWW for info search and research:</TD><TD>$contents{'s2'}</TD></TR>
|
||||
<TR><TD>Wordprocessing and office based work:</TD><TD>$contents{'s3'}</TD></TR>
|
||||
<TR><TD>Cruising internet for fun and pleasure</TD><TD>$contents{'s4'}</TD></TR>
|
||||
<TR><TD>Engineering apps CADCAM, PCB etc.</TD><TD>$contents{'s5'}</TD></TR>
|
||||
<TR><TD>Shareware source</TD><TD>$contents{'s6'}</TD></TR>
|
||||
<TR><TD>Programming apps, VisC, Pascal, VB etc</TD><TD>$contents{'s7'}</TD></TR>
|
||||
<TR><TD>Storage of files and userdata</TD><TD>$contents{'s8'}</TD></TR>
|
||||
<TR><TD>Exam results electronic lecture notes.</TD><TD>$contents{'s9'}</TD></TR>
|
||||
</TABLE></CENTER>
|
||||
|
||||
<P>You would like to see the following services at Our Site (Let's pray together that it will happen soon...):<BR>
|
||||
<QUOTE>$contents{'future'}</QUOTE><P>
|
||||
|
||||
You think that $contents{'numstaff'} staff member(s) is/are needed to maintain our network.<P>
|
||||
According to you an amount of $contents{'hypopay'} is fair for a network account per year, as long as you can get the no $contents{'hserv'} service you asked for.
|
||||
<P>
|
||||
<HR>
|
||||
Thank you for submitting this request for a new user account.
|
||||
Your account will be processed by
|
||||
<A HREF="mailto:adminuser\@your.domain.name">adminuser\@your.domain.name</A> or
|
||||
<A HREF="mailto:bigboss\@your.domain.name">bigboss\@your.domain.name</A>. Please give us a few days to decide whether you would make a suitable user. It normally takes only a few minutes to create the account if one of us is close-by.
|
||||
<HR>
|
||||
<h1> Futher information </h1>
|
||||
You automagically get the following as a bonus:
|
||||
<UL>
|
||||
<LI> Electronic mail (Your email account will most probably be $contents{sname1}\@your.domain.name)
|
||||
<LI> Your own WWW page which you can customize from anywhere.
|
||||
<LI> Your own public ftp site
|
||||
<LI> Secure storage space for your data on the file server
|
||||
<LI> Access to our software and shareware
|
||||
<LI> Remote access to your data, where-ever you are roaming about.
|
||||
<LI> A public accessible read-write file area to exchange data with others.
|
||||
<LI> Automated secure backups of your data
|
||||
</UL>
|
||||
<P>
|
||||
Follow <A HREF="/main/ohhelp.html">this link</a> to get more detailed information on the services and how to make use of it.
|
||||
|
||||
<HR>
|
||||
This automated service creates a file that could create your new account with
|
||||
a single keypress, if the network administrator feels like it. ALL you need to
|
||||
do on your own is to visit the network center to select a password for yourself.Even with the account created it will not be active before you either phone or visit your network admin to set up your password.
|
||||
<HR>
|
||||
<FONT SIZE=3><I>Last updated 960916</I></FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
HTML
|
||||
|
||||
# Now create email message and mail it.
|
||||
$subject = "New User application - $date";
|
||||
$sendto = "adminuser\@your.domain.name, bigboss\@your.domain.name";
|
||||
|
||||
# open named pip to send mail
|
||||
open (MAIL, "| /usr/sbin/sendmail $sendto") || die "Cannot send mail: $!\n";
|
||||
# this selects the open handle to send email:
|
||||
select(MAIL);
|
||||
print <<"EMAIL";
|
||||
Date: $date
|
||||
From: root\@your.domain.name
|
||||
Return-Path: <$contents{'refmail'}>
|
||||
To: $sendto
|
||||
Subject: $subject
|
||||
|
||||
This is an automated reply to the http://yourweb.site.name/ohform.html script.
|
||||
|
||||
New user application details - $date
|
||||
Please note: A file was created under $contents{'base'}/httpd/newuser/$contents{'sname1'}.$ddd
|
||||
that can be directly executed by root in order to create the account.
|
||||
EMAIL
|
||||
|
||||
if ($contents{'addtitle'} eq 'addmytitle')
|
||||
{
|
||||
print <<"EMAIL";
|
||||
Full name: $contents{'title'} $contents{'fname'}
|
||||
EMAIL
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{ print <<"EMAIL";
|
||||
Full name: $contents{'fname'}
|
||||
EMAIL
|
||||
}
|
||||
|
||||
print <<"EMAIL";
|
||||
Working from machine or proxy: $contents{'remoteip'}
|
||||
Title: $contents{'title'}
|
||||
|
||||
Username1: $contents{'sname1'}
|
||||
Username2: $contents{'sname2'}
|
||||
Username3: $contents{'sname3'}
|
||||
|
||||
Office: $contents{'office'}
|
||||
WorkPhone: $contents{'wtel'}
|
||||
HomePhone: $contents{'htel'}
|
||||
Birthdate: $contents{'bidate'}
|
||||
Stud/ID number: $contents{'idnum'}
|
||||
Refference Person: $contents{'reff'}
|
||||
Refference Email : $contents{'refmail'}
|
||||
Would like to help with network problems?: $contents{'helpme'}
|
||||
|
||||
Skill: $contents{'skill'}
|
||||
Primary operating System: $contents{'os'}
|
||||
Knowlage on: $contents{'oos1'} $contents{'oos2'} $contents{'oos3'} $contents{'oos4'} $contents{'oos5'} $contents{'oos6'} $contents{'oos7'} $contents{'oos8'} $contents{'oos9'}
|
||||
|
||||
Usership plea: $contents{'whyi'}
|
||||
|
||||
Questionaire
|
||||
============
|
||||
Email: $contents{'s1'}
|
||||
WWW: $contents{'s2'}
|
||||
Office: $contents{'s3'}
|
||||
FunGames: $contents{'s4'}
|
||||
Apps: $contents{'s5'}
|
||||
Shareware: $contents{'s6'}
|
||||
Programming: $contents{'s7'}
|
||||
Storage: $contents{'s8'}
|
||||
Exam and notes: $contents{'s9'}
|
||||
Staffnum: $contents{'numstaff'}
|
||||
YearFee: $contents{'hypopay'}
|
||||
ServiceLevel: $contents{'hserv'}
|
||||
ConnectionValue1: $contents{'userv'}
|
||||
ConnectionValue2: $contents{'nserv'}
|
||||
MonthAccount: $contents{'aserv'}
|
||||
AccountMethod: $contents{'aget'}
|
||||
AccountExtra: $contents{'aret'}
|
||||
|
||||
Services interrested in
|
||||
=======================
|
||||
BirthdayNotify: $contents{'c0'}
|
||||
VoiceMail: $contents{'c1'}
|
||||
PinupNotice: $contents{'c2'}
|
||||
AppointRemind: $contents{'c3'}
|
||||
GlobalPhoneBook: $contents{'c4'}
|
||||
LocalIRCserver: $contents{'c5'}
|
||||
AutomatedSoftwareInstalls: $contents{'c6'}
|
||||
VoiceDictation: $contents{'c7'}
|
||||
ExamsonComputers: $contents{'c8'}
|
||||
VideoLectures: $contents{'c9'}
|
||||
VideoConference: $contents{'c10'}
|
||||
SharedAppointment: $contents{'c11'}
|
||||
AnimatedMultimedia: $contents{'c12'}
|
||||
StudentResults: $contents{'c13'}
|
||||
HWSFTWMonitor: $contents{'c14'}
|
||||
|
||||
|
||||
Please phone the user and ask him/her to come and select a password for themselves.
|
||||
|
||||
From your friendly automated Webserver running Mars.
|
||||
EMAIL
|
||||
close(MAIL);
|
||||
|
||||
# Append questionaire to the log.
|
||||
open(CATFILE, ">> /var/log/newusr.questionaire") || die "Cant update newuser questionaire list";
|
||||
select(CATFILE);
|
||||
print "$contents{'fname'}:";
|
||||
print "$contents{'skill'}:";
|
||||
print "$contents{'helpme'}:";
|
||||
print "$contents{'os'}:";
|
||||
print "$contents{'oos1'}:";
|
||||
print "$contents{'oos2'}:";
|
||||
print "$contents{'oos3'}:";
|
||||
print "$contents{'oos4'}:";
|
||||
print "$contents{'oos5'}:";
|
||||
print "$contents{'oos6'}:";
|
||||
print "$contents{'oos7'}:";
|
||||
print "$contents{'oos8'}:";
|
||||
print "$contents{'oos9'}:";
|
||||
print "$contents{'s1'}:";
|
||||
print "$contents{'s2'}:";
|
||||
print "$contents{'s3'}:";
|
||||
print "$contents{'s4'}:";
|
||||
print "$contents{'s5'}:";
|
||||
print "$contents{'s6'}:";
|
||||
print "$contents{'s7'}:";
|
||||
print "$contents{'s8'}:";
|
||||
print "$contents{'s9'}:";
|
||||
print "$contents{'hserv'}:";
|
||||
print "$contents{'userv'}:";
|
||||
print "$contents{'nserv'}:";
|
||||
print "$contents{'aserv'}:";
|
||||
print "$contents{'aget'}:";
|
||||
print "$contents{'aret'}:";
|
||||
print "$contents{'c0'}:";
|
||||
print "$contents{'c1'}:";
|
||||
print "$contents{'c2'}:";
|
||||
print "$contents{'c3'}:";
|
||||
print "$contents{'c4'}:";
|
||||
print "$contents{'c5'}:";
|
||||
print "$contents{'c6'}:";
|
||||
print "$contents{'c7'}:";
|
||||
print "$contents{'c8'}:";
|
||||
print "$contents{'c9'}:";
|
||||
print "$contents{'c10'}:";
|
||||
print "$contents{'c11'}:";
|
||||
print "$contents{'c12'}:";
|
||||
print "$contents{'c13'}:";
|
||||
print "$contents{'c14'}\n";
|
||||
close(CATFILE);
|
||||
|
||||
# Create an autouser script
|
||||
open(NFILE, "> $contents{'base'}/httpd/newuser/$contents{'sname1'}.$ddd") || die "Cannot create autouser file";
|
||||
select(NFILE);
|
||||
print "#/bin/bash\n\n";
|
||||
print "/usr/sbin/ohmasteruser \"$contents{'sname1'}\" ";
|
||||
if ($contents{'addtitle'} eq 'addmytitle')
|
||||
{
|
||||
print "\"$contents{'title'} ";
|
||||
}
|
||||
else
|
||||
{ print "\""; }
|
||||
print "$contents{'fname'}\" ";
|
||||
print "\"$contents{'office'}\" ";
|
||||
print "\"$contents{'wtel'}\" ";
|
||||
print "\"$contents{'htel'}\" ";
|
||||
print "\"$contents{'bidate'}\"\n";
|
||||
print "\n\n# Other names if it is a clash: $contents{'sname2'}";
|
||||
print "\n# Other name: $contents{'sname3'}\n";
|
||||
close(NFILE);
|
||||
$a=`chmod +x "$contents{'base'}/httpd/newuser/$contents{'sname1'}.$ddd"`;
|
||||
$a=`chmod o-rwx "$contents{'base'}/httpd/newuser/$contents{'sname1'}.$ddd"`;
|
||||
$a=`chmod g-rwx "$contents{'base'}/httpd/newuser/$contents{'sname1'}.$ddd"`;
|
||||
}
|
||||
exit;
|
134
nomasteruser
Executable file
134
nomasteruser
Executable file
@ -0,0 +1,134 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This scripts complements ohmasteruser by destroying accounts and doing
|
||||
# some cleanup...
|
||||
|
||||
|
||||
user=$1 # username passed to this script
|
||||
DHOME="/hamster/home" # place for home dirs
|
||||
BASE="/hamster" # place before SYS volume
|
||||
SNAME="nw-admin" # supervisor name
|
||||
SHOME="supervis" # Supervisor home dir
|
||||
|
||||
#Get user name
|
||||
if [ "$user" = "" ]
|
||||
then
|
||||
echo -n "What user should be cast into the pit: "
|
||||
read user
|
||||
fi
|
||||
|
||||
# Check existing
|
||||
if ! grep "^$user:" /etc/passwd > /dev/null
|
||||
then
|
||||
echo "Removing Nonexisting users lead to time paradoxes, I quit!"
|
||||
exit
|
||||
else
|
||||
echo -n "Are you sure? (Type yes) "
|
||||
read yn
|
||||
if [ "$yn" != "yes" ]
|
||||
then
|
||||
echo "Chicken!"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
#11th commandment: thou should make backups
|
||||
cp /etc/passwd /etc/passwd.notmp
|
||||
cp /etc/group /etc/group.notmp
|
||||
|
||||
# Remove user from passwd file
|
||||
echo -n "Removing user from password file..."
|
||||
cat /etc/passwd | sed "/^$user:/d" > /etc/passwd.lock
|
||||
mv -f /etc/passwd /etc/passwd-
|
||||
mv -f /etc/passwd.lock /etc/passwd
|
||||
echo "done..."
|
||||
|
||||
# Remove user from shadow passwd file
|
||||
echo -n "Removing user from shadow password file...."
|
||||
mv /etc/shadow /etc/shadow-
|
||||
cat /etc/shadow- | sed "/^$user:/d" > /etc/shadow
|
||||
echo "done..."
|
||||
|
||||
# Remove user from group file
|
||||
echo -n "Removing user from group file.... "
|
||||
cat /etc/group | sed "/^$user:/d" > /etc/group.lock
|
||||
mv -f /etc/group /etc/group-
|
||||
mv -f /etc/group.lock /etc/group
|
||||
cat /etc/group | sed "s/:$user,/:/" > /etc/group.l1
|
||||
cat /etc/group.l1 | sed "s/,$user,/,/" > /etc/group.l2
|
||||
cat /etc/group.l2 | sed "s/,$user$//" > /etc/group.l3
|
||||
mv -f /etc/group /etc/group-
|
||||
mv -f /etc/group.l3 /etc/group
|
||||
rm /etc/group.l1 /etc/group.l2
|
||||
echo "done..."
|
||||
|
||||
# Remove user from expiry file
|
||||
echo -n "Removing user from account expiry file... "
|
||||
cp /etc/expiry /etc/expiry-
|
||||
cat /etc/expiry- | sed "/^$user:/d" > /etc/expiry
|
||||
echo "Done..."
|
||||
|
||||
# Remove user from birthdays file
|
||||
echo -n "Remove user from birthdays file.... "
|
||||
cp /etc/birthdays /etc/birthdays-
|
||||
cat /etc/birthdays | sed "/^$user:/d" > /etc/birthdays
|
||||
echo "Done...."
|
||||
|
||||
echo -n "Removing user from mail delivery notification file.... "
|
||||
cp /etc/ohmaillist /etc/ohmaillist-
|
||||
cat /etc/ohmaillist- | sed "/^$user$/d" > /etc/ohmaillist
|
||||
echo "Done..."
|
||||
|
||||
# Remove user's mail box
|
||||
echo -n "Removing user's mailbox..."
|
||||
rm /var/spool/mail/$user
|
||||
rm /tmp/mail/$user
|
||||
echo "done..."
|
||||
|
||||
# Remove user's files
|
||||
echo -n "Should I remove all $user's data as well? (Type yes) "
|
||||
read yn
|
||||
if [ "$yn" = "yes" ]
|
||||
then
|
||||
echo "Removing ..."
|
||||
rm -r $DHOME/$user
|
||||
rm -r $DHOME/httpd/html/$user
|
||||
|
||||
# here needs to be some code to delete the novell mailbox as well
|
||||
|
||||
NOVMAIL="`ls -l $BASE/SYS/mail | grep " $user " | colrm 1 55`"
|
||||
if [ "$NOVMAIL" != "" ] ; then
|
||||
echo -n "Removing Novell mailbox $NOVMAIL ... "
|
||||
rm -r $BASE/SYS/mail/$NOVMAIL
|
||||
echo "done..."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n "Updating myusers.html... "
|
||||
$DHOME/httpd/cgi-bin/nph-users > /$DHOME/httpd/html/myusers.html
|
||||
chmod 755 $DHOME/httpd/html/myusers.html
|
||||
echo "done..."
|
||||
|
||||
echo -n "Removing user from Novell binderies... "
|
||||
echo -e "#DELETE $user^\r\n" >> $DHOME/$SHOME/users.usr
|
||||
chown $SNAME.$SNAME $DHOME/$SHOME/users.usr
|
||||
echo -n "done..."
|
||||
|
||||
# The following removes stuff from the dummy group and passwd file for ftp
|
||||
echo -n "Updating passwd clone in ..base../home/etc... "
|
||||
cat /etc/passwd | cut -f 1,3,4,5,6,7,8,9,10 -d : - | sed s/:/:*:/ > $DHOME/etc/passwd
|
||||
cp /etc/group $DHOME/etc/group
|
||||
echo "done..."
|
||||
|
||||
|
||||
echo "Supervisor, please just logon to marsserver to remove this user automagically."
|
||||
echo ""
|
||||
echo "Password linecount: bottom number should be one less"
|
||||
wc /etc/passwd.notmp
|
||||
wc /etc/passwd
|
||||
echo "Groupfile linecount: bottom number should be one less"
|
||||
wc /etc/group.notmp
|
||||
wc /etc/group
|
||||
echo "All done, please inform user $user of his non-existance"
|
||||
|
||||
#DONE...
|
64
nph-users
Executable file
64
nph-users
Executable file
@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
# This script creates the html document that displays your current
|
||||
# users on the mars/samba server in a nice html format
|
||||
|
||||
base="/hamster/home/" # Base dir of home dirs
|
||||
|
||||
|
||||
echo "<HTML>"
|
||||
echo "<TITLE>Mars Server - Current users</TITLE>"
|
||||
echo "<BODY background=/yourown.gif>"
|
||||
echo "<H1>MarsServer User List and Email addresses</H1>"
|
||||
echo '<IMG SRC="/img/yourown.jpg" ALT="Nice graphic that you cannot see">'
|
||||
echo ""
|
||||
echo "<P>(See how much <A HREF="/main/quotas.html">diskspace</A> is in use by the users)<P>"
|
||||
touch /tmp/ulist.tmp
|
||||
rm /tmp/ulist.tmp
|
||||
mv /etc/ohulist /etc/ohulist-
|
||||
touch /tmp/ulist.tmp
|
||||
|
||||
for l in `ls $base/httpd/html`;
|
||||
do
|
||||
LNAME=`grep "^$l:" /etc/passwd | cut -f 5 -d : - | cut -f 1 -d , -`
|
||||
if [ $l = "ftp" ]; then LNAME=""; fi
|
||||
if [ $l = "gopher" ]; then LNAME=""; fia
|
||||
|
||||
### NNNB Please add simular lines not to display other kinds of autousers.
|
||||
|
||||
if [ "$LNAME" != "" ]; then
|
||||
echo "$LNAME : $l" >> /tmp/ulist.tmp
|
||||
fi
|
||||
done
|
||||
|
||||
cat /tmp/ulist.tmp | sort > /tmp/ulist2.tmp
|
||||
rm /tmp/ulist.tmp
|
||||
cat /tmp/ulist2.tmp | cut -f 2 -d : - > /tmp/ulist3.tmp
|
||||
rm /tmp/ulist2.tmp
|
||||
|
||||
echo "<CENTER><TABLE width=70% BORDER>"
|
||||
|
||||
|
||||
for l in `cat /tmp/ulist3.tmp`;
|
||||
do
|
||||
LNAME=`grep "^$l:" /etc/passwd | cut -f 5 -d : - | cut -f 1 -d , -`
|
||||
# OFONE=`grep $l /etc/passwd | cut -f 5 -d : -
|
||||
# echo "$LNAME with $l"
|
||||
echo -n '<TR><TD><A HREF="http://your.full.domain.name/'
|
||||
echo -n "$l"
|
||||
echo -n '">'
|
||||
echo -n "$LNAME</A></TD><TD><A HREF="
|
||||
echo -n '"mailto:'
|
||||
echo -n "$l@email.domain.name"
|
||||
echo -n '">'
|
||||
echo "$l@eng.rau.ac.za</a></TD></TR>"
|
||||
echo -e "$LNAME \t\t\t email: $l@email.domain.name" >> /etc/ohulist
|
||||
done
|
||||
echo "</TABLE></CENTER>"
|
||||
echo "This service brought to you by Marsmail scripting."
|
||||
echo "<HR>"
|
||||
echo "(Use your browsers BACK button to go back to the main page.)"
|
||||
echo -n "</BODY>"
|
||||
echo -n "</HTML>"
|
||||
|
||||
|
||||
rm /tmp/ulist3.tmp
|
98
ohbirthcheck
Executable file
98
ohbirthcheck
Executable file
@ -0,0 +1,98 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Birthday reminder script for Mars and/or Samba
|
||||
# This scripts sends out automated email for logged in users and the
|
||||
# birthday boy on the correct date and should be started out of cron
|
||||
# once a day before teatime :)
|
||||
# Script creates a birthday.html file that can be included in another
|
||||
# page. Script logs into mars server with mailusr and does nwuserlist.
|
||||
# script can be linked to a notice board.... (i've edited it out though!)
|
||||
|
||||
# bpath=basepath
|
||||
# lpath=logpath
|
||||
# nowdate = current date e.g. Oct 24
|
||||
|
||||
srvname="ohmaster" #Samba or mars server
|
||||
marssrv="ohamster" #Mars server name
|
||||
mailusr="agenericmailusertodonwuserlists" #Mail user
|
||||
mailpwd="passwdforgenericmailuser" #Mail user passwd
|
||||
admname="eddie" #your administrator email name
|
||||
admfullname="Eddie Dunckley" #Full name
|
||||
site="RAU Engineering" #Your site name
|
||||
fqdn="ohmaster.rau.ac.za"
|
||||
bpath="/hamster/home/httpd/html/main" # where to place birthday.html
|
||||
lpath="/var/log" # Path to keep log files
|
||||
nowdate=`/bin/date | /usr/bin/awk ' { print $2 " " $3 } ' `
|
||||
|
||||
|
||||
|
||||
# Script starts here
|
||||
: > $bpath/birthday.txt # clears the birthday file
|
||||
|
||||
/usr/bin/grep -i ":$nowdate:" /etc/birthdays > $bpath/birthday.txt
|
||||
|
||||
if [ `ls -l $bpath/birthday.txt | /usr/bin/awk ' { print $5 } '` != 0 ] ;
|
||||
then
|
||||
echo -en "$nowdate: Birthday's happening today:\r\n" > $bpath/bday.txt
|
||||
echo -en "-----------------------------------------------\r\n" >> $bpath/bday.txt
|
||||
echo -en "\r\n" >> $bpath/bday.txt
|
||||
echo "<CENTER>Current Birthdays for $nowdate:<BR><TABLE BORDER WIDTH=80% CELLPADDING=5 BGCOLOR=#FFFFFF>" > $bpath/bday.inc
|
||||
|
||||
else
|
||||
: > $bpath/bday.inc
|
||||
touch $bpath/bday.txt
|
||||
rm $bpath/bday.txt
|
||||
fi
|
||||
|
||||
for birthuid in `cat $bpath/birthday.txt | cut -f 1 -d ":"` ;
|
||||
do
|
||||
birthguys=`/usr/bin/grep "^$birthuid:" $bpath/birthday.txt | cut -f 2 -d ":"`
|
||||
birthstring=`/usr/bin/grep "^$birthuid:" $bpath/birthday.txt | awk -F ":" ' { print $4 } ' `
|
||||
echo "<TR><TD>$birthguys</TD><TD><a href=\"mailto:$birthuid@$fqdn\">$birthuid@$fqdn</a></TD><TD>$birthstring</TD></TR>" >> $bpath/bday.inc
|
||||
echo -en "$birthguys's birthday! Send mail to $birthuid@$fqdn...\r\n" >> $bpath/bday.txt
|
||||
echo -en "$birthguys: $birthstring \r\n" >> $bpath/bday.txt
|
||||
|
||||
cat << EOMES | /usr/sbin/sendmail -f "$admname@$fqdn" -t
|
||||
To: $birthuid@$fqdn ($birthguys)
|
||||
From: $admname@$fqdn ($admfullname)
|
||||
Reply-To: $admname@$fqdn ($admfullname)
|
||||
Return-path: <$admname@$fqdn>
|
||||
X-Mailer: Automated Birthday notification scripts
|
||||
Subject: Happy Birthday: $birthguys!
|
||||
|
||||
Dear $birthguys,
|
||||
|
||||
May you have the best day of your life today.
|
||||
|
||||
Congratulations on your birthday! The whole $site staff and students
|
||||
are thinking about you today. In far countries strange people are singing
|
||||
songs in honour of your birth today.
|
||||
|
||||
If you brought cake and drinks along, please invite the $site staff to
|
||||
join in the festive activities. May $nowdate be one of the best days you've
|
||||
ever encountered!
|
||||
|
||||
From your friendly Automated $srvname Virtual Server and programmers.
|
||||
EOMES
|
||||
|
||||
sleep 4
|
||||
for lnames in `/usr/sbin/smbstatus | /usr/bin/awk ' { print $5 }' | sort | uniq | /bin/sed "/machine/d" | /bin/sed "1 d" ` ;
|
||||
do
|
||||
# echo "Processing $lnames smbside for $birthguys"
|
||||
echo "NB: It's user $birthuid ($birthguys)'s birthday today!" | /usr/sbin/smbclient -M $lnames 2>&1 > /dev/null
|
||||
echo "`/bin/date` -- Sent Birthday notice to $lnames" >> $lpath/ohmessage.log
|
||||
done
|
||||
for nnames in `/usr/local/bin/nwuserlist -S $marssrv -U $mailusr -P $mailpwd | /usr/bin/awk ' { print $2 } ' | sort | uniq` ;
|
||||
do
|
||||
# echo "Processing nsend to $nnames for $birthguys birthday.."
|
||||
/usr/local/bin/nsend -S ohamster -U ohmessage -P sendthemall $nnames "NB: It's user $birthuid ($birthguys)'s birthday!"
|
||||
echo "`/bin/date` -- Sent Birthday notice to NetWare user $nnames" >> $lpath/ohmessage.log
|
||||
done
|
||||
done
|
||||
|
||||
if [ `ls -l $bpath/birthday.txt | /usr/bin/awk ' { print $5 } '` != 0 ] ;
|
||||
then
|
||||
echo "</TABLE></CENTER>" >> $bpath/bday.inc
|
||||
echo -en "\r\n" >> $bpath/bday.txt
|
||||
echo -en "May he/her/they become as old as the mountains! --$marssrv\r\n" >> $bpath/bday.txt
|
||||
fi
|
32
ohexiry
Executable file
32
ohexiry
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This will soon be a script to expire users no longer active
|
||||
#
|
||||
### WARNING: THIS SCRIPT IS NOT FINISHED!!!! Change to your needs!
|
||||
# it uses /etc/expiry created by ohmasteruser to determine
|
||||
# if accounts must be expired or not.... started through cron....
|
||||
|
||||
|
||||
hbase="/hamster/home/httpd/html/main/"
|
||||
dday=`/bin/date -d "1 month" +%m-%y `
|
||||
nday=`/bin/date +%d`
|
||||
|
||||
|
||||
for l in `cat /etc/expiry ` ;
|
||||
do
|
||||
erflg="0";
|
||||
uname=`echo "$l" | cut -f 1 -d ":"` ;
|
||||
uday=`echo "$l" | cut -f 2 -d ":"` ;
|
||||
echo "$uday $dday"
|
||||
if [ "$uday" = "$dday" ] ; then
|
||||
#issue warning here.
|
||||
echo "Will expire at 0h00 on the 28th of this month"
|
||||
if ["$nday" = "28"] ; then
|
||||
echo "This account has finally expired"
|
||||
erflg="1"
|
||||
fi
|
||||
fi
|
||||
|
||||
#now create a new expiry file
|
||||
done
|
||||
|
269
ohform.htm
Executable file
269
ohform.htm
Executable file
@ -0,0 +1,269 @@
|
||||
|
||||
<HTML>
|
||||
<TITLE>Mars server user application form</TITLE>
|
||||
|
||||
<BODY BACKGROUND=/yourown.gif>
|
||||
<IMG SRC="/yourlogo.gif" ALT="LOGO" HEIGHT=114 WIDTH=640><BR>
|
||||
<P>
|
||||
<FONT size=+1><B><I>PLEASE NOTE: This service is for OUR SITE's staff and students only!</I></B></FONT><HR>
|
||||
<I>Oh Yee</I>, I would like to be enslaved by the Mars Virtual Server.
|
||||
I hereby apply for usership in the XXX domain and will obey the
|
||||
Mars's ever-changing rules.<P>
|
||||
I take note of the following:
|
||||
<UL>
|
||||
<LI>I will keep my home tidy and free of viri, executables, games and dirty stuff.
|
||||
<LI>I will keep my home smaller than 20Mb, since being a slave means sharing living quarters.
|
||||
<LI>I will discard all old email, we don't want the Mars angry, do we?
|
||||
<LI>I will refrain from placing commercial applications in my WWW space
|
||||
<LI>I will refrain from letting other users use my account
|
||||
<LI>I will stop all subscriptions to listservers BEFORE I leave the XXXX domain.
|
||||
<LI>I will clean my home before I depart permanently from the XXXX domain.
|
||||
<LI>I will make use of the online help BEFORE phoning the network staff.
|
||||
</UL>
|
||||
<HR SIZE=6 WIDTH=80%>
|
||||
<CENTER><H2>User Application form</H2></CENTER>
|
||||
|
||||
<FORM METHOD=POST ACTION="http://your.web.site/cgi-bin/newuser.pl">
|
||||
<H3>Applicant's details</H3>
|
||||
XXXXX needs your pedigree.
|
||||
If you are found to make a suitable slave (user) you will be notified telephonically.
|
||||
|
||||
<P>
|
||||
<INPUT SIZE=30 NAME="fname"> Full Name and Surname<BR>
|
||||
<INPUT SIZE=5 NAME="title"> Title
|
||||
<INPUT TYPE="checkbox" NAME="addtitle" VALUE="addmytitle"> Add my title to the fullname of the account<BR>
|
||||
<INPUT SIZE=30 NAME="office"> My office number e.g. Cybernetics B1L1<BR>
|
||||
Choose a username and two alternatives <INPUT SIZE=8 NAME="sname1"> or <INPUT SIZE=8 NAME="sname2"> or <INPUT SIZE=8 NAME="sname3"><BR>
|
||||
<FONT SIZE=-2><I>Please note: If your name is Peter de Villiers a username of <b>Cyclops</B>
|
||||
will most definately NOT be accepted. Use <b>pieterdv</B> or <b>pdv</B> or <b>pdevil</b> for the above example.</FONT><BR>
|
||||
<P>
|
||||
<INPUT SIZE=13 NAME="wtel" VALUE="011-"> Work phone
|
||||
<INPUT SIZE=13 NAME="htel" VALUE="011-"> Home phone<BR>
|
||||
<INPUT SIZE=13 NAME="bidate" VALUE="Jan 01"> Birthday e.g. Oct 24<BR>
|
||||
<INPUT SIZE=13 NAME="idnum"> Student, Personnel or ID number<BR>
|
||||
|
||||
<INPUT SIZE=30 NAME="reff"> Reference person or Study leader<BR>
|
||||
<INPUT SIZE=30 NAME="refmail"> Reference's email addr<P>
|
||||
|
||||
<h4>Why do I want to be a user?</h4>
|
||||
<B>M</B>any persons want to be network users because they
|
||||
see it as a status symbol or they <i>just want to fool around</i> or saw
|
||||
one of their friends in front of a PC and thought it looked quite <i>cool</i>.
|
||||
They don't have the foggiest idea what they will to do IF they become slaves
|
||||
or what a network is all about. Please explain in a few lines why you would like to become a slave of the XXXX Virtual server.
|
||||
<p>
|
||||
<TEXTAREA NAME="whyi" ROWS=5 COLS=65>
|
||||
</TEXTAREA><p>
|
||||
<HR>
|
||||
<H2>Questionaire</H2>
|
||||
Please complete the following questionnaire. It will help us to plan for the
|
||||
future. This is your chance to make a difference...
|
||||
<H4>Computer-skills</H4>
|
||||
My level of computer-skills:<P>
|
||||
<UL>
|
||||
<LI>Newbee barely knows where to switch on the <I>kompewter</I>.
|
||||
Tries to feed mouse.<BR>
|
||||
<LI>Beginner knows how to use mouse and click on icons to open programs<BR>
|
||||
<LI>Average user customizes his desktop scheme and types <I>install</I> to install programs.<BR>
|
||||
<LI>Advanced user compiles his own programs and installs operating systems.<BR>
|
||||
<LI>Master hacks unix boxes and knows NOS and writes device drivers in ASM.<BR>
|
||||
<LI>Guru lives in a cave with his Mother-in-Law
|
||||
</UL>
|
||||
|
||||
<INPUT TYPE="radio" NAME="skill" VALUE "newbie"> NewBee
|
||||
<INPUT TYPE="radio" NAME="skill" VALUE "beginner"> Beginner
|
||||
<INPUT TYPE="radio" NAME="skill" VALUE "average"> Average
|
||||
<INPUT TYPE="radio" NAME="skill" VALUE "advanced"> Advanced
|
||||
<INPUT TYPE="radio" NAME="skill" VALUE "master"> Master
|
||||
<INPUT TYPE="radio" NAME="skill" VALUE "guru"> Guru <P>
|
||||
|
||||
Are you interested in helping out with network related work?
|
||||
<INPUT TYPE="radio" NAME="helpme" VALUE="yes"> YES
|
||||
<INPUT TYPE="radio" NAME="helpme" VALUE="no"> NO<P>
|
||||
|
||||
<h4>My first choice operating system</h4>
|
||||
<UL>
|
||||
<LI>DOS users like the wording <I>Non-reentrant interrupt handler</i>
|
||||
<LI>Win3xx and fw users like to press the GPF button
|
||||
<LI>Win95 users like non-protected net,cd,diskcache and hairthin crashprotection
|
||||
<LI>OS/2 users enjoy the power of raw multithreading, but cannot spell <I> multiuser</I>
|
||||
<LI>Linux users will willingly spend 5 days doing stuff others do in 15 seconds
|
||||
<LI>NT users enjoy seeing P-PRO-200's run like a 386es, and call themselves gurus
|
||||
<LI>A Solaris user probably has a mother-in-Law.
|
||||
<LI>Mac users smile when waking up.
|
||||
<LI>Other users cannot spell <i>industry standard</i>.
|
||||
</UL>
|
||||
|
||||
<INPUT TYPE="radio" NAME="os" VALUE="dos"> DOS
|
||||
<INPUT TYPE="radio" NAME="os" VALUE="win3"> Win3.xxfw
|
||||
<INPUT TYPE="radio" NAME="os" VALUE="w95"> Windows 95
|
||||
<INPUT TYPE="radio" NAME="os" VALUE="os2"> OS/2
|
||||
<INPUT TYPE="radio" NAME="os" VALUE="linux"> Linux
|
||||
<INPUT TYPE="radio" NAME="os" VALUE="nt"> NT
|
||||
<INPUT TYPE="radio" NAME="os" VALUE="solaris"> Solaris
|
||||
<INPUT TYPE="radio" NAME="os" VALUE="mac"> Mac
|
||||
<INPUT TYPE="radio" NAME="os" VALUE="other"> Other<P>
|
||||
|
||||
I can also use some of the following operating systems.<BR>
|
||||
<INPUT TYPE="checkbox" NAME="oos1" VALUE="dos"> DOS
|
||||
<INPUT TYPE="checkbox" NAME="oos2" VALUE="win3"> Win3.xx(fw)
|
||||
<INPUT TYPE="checkbox" NAME="oos3" VALUE="w95"> Windows 95
|
||||
<INPUT TYPE="checkbox" NAME="oos4" VALUE="os2"> OS/2
|
||||
<INPUT TYPE="checkbox" NAME="oos5" VALUE="linux"> Linux
|
||||
<INPUT TYPE="checkbox" NAME="oos6" VALUE="nt"> NT
|
||||
<INPUT TYPE="checkbox" NAME="oos7" VALUE="solaris"> Solaris
|
||||
<INPUT TYPE="checkbox" NAME="oos8" VALUE="mac"> Mac
|
||||
<INPUT TYPE="checkbox" NAME="oos9" VALUE="other"> Other<P>
|
||||
|
||||
|
||||
<h4>What do I see as the most important function of the network?</h4>
|
||||
<i>Please give a priority next to the following network services. 1 means you
|
||||
think it's for the birds and 5 means that if this service should dissappear,
|
||||
you would die. Please show some sort of personality, all 5's will not impress OhMaster.</I>
|
||||
<P>
|
||||
<INPUT TYPE="radio" NAME="s1" value="1">1
|
||||
<INPUT TYPE="radio" NAME="s1" value="2">2
|
||||
<INPUT TYPE="radio" NAME="s1" value="3">3
|
||||
<INPUT TYPE="radio" NAME="s1" value="4">4
|
||||
<INPUT TYPE="radio" NAME="s1" value="5">5
|
||||
.. E-Mail and other communication tools<BR>
|
||||
|
||||
<INPUT TYPE="radio" NAME="s2" value="1">1
|
||||
<INPUT TYPE="radio" NAME="s2" value="2">2
|
||||
<INPUT TYPE="radio" NAME="s2" value="3">3
|
||||
<INPUT TYPE="radio" NAME="s2" value="4">4
|
||||
<INPUT TYPE="radio" NAME="s2" value="5">5
|
||||
.. World Wide Web for info search and research<BR>
|
||||
|
||||
<INPUT TYPE="radio" NAME="s3" value="1">1
|
||||
<INPUT TYPE="radio" NAME="s3" value="2">2
|
||||
<INPUT TYPE="radio" NAME="s3" value="3">3
|
||||
<INPUT TYPE="radio" NAME="s3" value="4">4
|
||||
<INPUT TYPE="radio" NAME="s3" value="5">5
|
||||
.. Word-processing and office based work<BR>
|
||||
|
||||
<INPUT TYPE="radio" NAME="s4" value="1">1
|
||||
<INPUT TYPE="radio" NAME="s4" value="2">2
|
||||
<INPUT TYPE="radio" NAME="s4" value="3">3
|
||||
<INPUT TYPE="radio" NAME="s4" value="4">4
|
||||
<INPUT TYPE="radio" NAME="s4" value="5">5
|
||||
.. Cruising internet for fun and pleasure<BR>
|
||||
|
||||
<INPUT TYPE="radio" NAME="s5" value="1">1
|
||||
<INPUT TYPE="radio" NAME="s5" value="2">2
|
||||
<INPUT TYPE="radio" NAME="s5" value="3">3
|
||||
<INPUT TYPE="radio" NAME="s5" value="4">4
|
||||
<INPUT TYPE="radio" NAME="s5" value="5">5
|
||||
.. Engineering apps CAD/CAM, PCB design, math etc.<BR>
|
||||
|
||||
<INPUT TYPE="radio" NAME="s6" value="1">1
|
||||
<INPUT TYPE="radio" NAME="s6" value="2">2
|
||||
<INPUT TYPE="radio" NAME="s6" value="3">3
|
||||
<INPUT TYPE="radio" NAME="s6" value="4">4
|
||||
<INPUT TYPE="radio" NAME="s6" value="5">5
|
||||
.. Shareware source<BR>
|
||||
|
||||
<INPUT TYPE="radio" NAME="s7" value="1">1
|
||||
<INPUT TYPE="radio" NAME="s7" value="2">2
|
||||
<INPUT TYPE="radio" NAME="s7" value="3">3
|
||||
<INPUT TYPE="radio" NAME="s7" value="4">4
|
||||
<INPUT TYPE="radio" NAME="s7" value="5">5
|
||||
.. Programming apps, VisC, Pascal, VB etc.etc.<BR>
|
||||
|
||||
<INPUT TYPE="radio" NAME="s8" value="1">1
|
||||
<INPUT TYPE="radio" NAME="s8" value="2">2
|
||||
<INPUT TYPE="radio" NAME="s8" value="3">3
|
||||
<INPUT TYPE="radio" NAME="s8" value="4">4
|
||||
<INPUT TYPE="radio" NAME="s8" value="5">5
|
||||
.. Storage of files and userdata<BR>
|
||||
|
||||
<INPUT TYPE="radio" NAME="s9" value="1">1
|
||||
<INPUT TYPE="radio" NAME="s9" value="2">2
|
||||
<INPUT TYPE="radio" NAME="s9" value="3">3
|
||||
<INPUT TYPE="radio" NAME="s9" value="4">4
|
||||
<INPUT TYPE="radio" NAME="s9" value="5">5
|
||||
.. Examination results, electronic lecture notes.<BR>
|
||||
|
||||
<h4>What I would like to see in future</h4>
|
||||
What services would you like to see running at XXXXXXXXX in future?<P>
|
||||
<TEXTAREA NAME="future" ROWS=3 COLS=50>
|
||||
</TEXTAREA><BR>
|
||||
|
||||
<h4>Hypothetical</H4>
|
||||
How many staff members do you think should design, implement and maintain <I>and</I>
|
||||
give support to 200 workstations at XXXXXXXXXXX?
|
||||
<INPUT NAME="numstaff" SIZE=4>
|
||||
<P>
|
||||
If I had to pay for a network account, how much is fair?
|
||||
<INPUT NAME="hypopay" SIZE=8 VALUE="R0.00"> per year.<P>
|
||||
What level of service would you expect for it?
|
||||
<UL>
|
||||
<LI><INPUT TYPE="radio" NAME="hserv" VALUE="0"> Will take care of myself.
|
||||
<LI><INPUT TYPE="radio" NAME="hserv" VALUE="1"> Show me the ropes how to use services and that's it.
|
||||
<LI><INPUT TYPE="radio" NAME="hserv" VALUE="2"> A 3 day course on how to use the LAN software.
|
||||
<LI><INPUT TYPE="radio" NAME="hserv" VALUE="3"> Courses plus telephonic software support.
|
||||
<LI><INPUT TYPE="radio" NAME="hserv" VALUE="4"> 1 hour response time to software related queries.
|
||||
<LI><INPUT TYPE="radio" NAME="hserv" VALUE="5"> Full assistance: Software, hardware, help at my desk.
|
||||
</UL>
|
||||
<P>
|
||||
I see a network connection as<BR>
|
||||
<UL>
|
||||
<LI><INPUT TYPE="radio" NAME="userv" VALUE="0">A utility like water and electricity I expect XXXXXXXXXX to provide it as a standard.
|
||||
<LI><INPUT TYPE="radio" NAME="userv" VALUE="1">A extra feature utility like a telephone at a minimal yearly/monthly fee.
|
||||
<LI><INPUT TYPE="radio" NAME="userv" VALUE="2">A Nice to have utility like airconditioning for my car. I do expect to pay alot to have a network connection in my office.
|
||||
<LI><INPUT TYPE="radio" NAME="userv" VALUE="3">A luxury item like an expensive watch that I would never be able to afford
|
||||
</UL>
|
||||
Having a network connection is<BR>
|
||||
<UL>
|
||||
<LI><INPUT TYPE="radio" NAME="nserv" VALUE="0"> a total waste of time, highly overrated
|
||||
<LI><INPUT TYPE="radio" NAME="nserv" VALUE="1"> a good thing, a bit overrated but it can serve me as a tool
|
||||
<LI><INPUT TYPE="radio" NAME="nserv" VALUE="2"> like a speedo in a car, it REALLY makes life easier.
|
||||
<LI><INPUT TYPE="radio" NAME="nserv" VALUE="3"> very important if I want to complete projects in time
|
||||
<LI><INPUT TYPE="radio" NAME="nserv" VALUE="4">a way of life. I could not live without it.
|
||||
</UL>
|
||||
What would I like to see on a monthly network account?
|
||||
<UL>
|
||||
<LI><INPUT TYPE="radio" NAME="aserv" VALUE="0">NO! No monthly account!
|
||||
<LI><INPUT TYPE="radio" NAME="aserv" VALUE="1">The amount of diskspace I use
|
||||
<LI><INPUT TYPE="radio" NAME="aserv" VALUE="2">Diskspace and time I've spent at a live connection.
|
||||
<LI><INPUT TYPE="radio" NAME="aserv" VALUE="3">Diskspace, time and local vs international traffic I've generated.
|
||||
<LI><INPUT TYPE="radio" NAME="aserv" VALUE="4">Diskspace, time, traffic and a list of files I've accessed.
|
||||
</UL>
|
||||
<P>
|
||||
If you were forced to a monthly account, how would you like to receive it?<BR>
|
||||
<INPUT TYPE="radio" NAME="aget" VALUE="email"> via Email
|
||||
<INPUT TYPE="radio" NAME="aget" VALUE="web"> on the Web
|
||||
<INPUT TYPE="radio" NAME="aget" VALUE="both"> both
|
||||
<INPUT TYPE="radio" NAME="aget" VALUE="paper"> Old-fashioned snailmail paper account.<P>
|
||||
Would you like to see the results of ALL the users or just your own.<BR>
|
||||
<INPUT TYPE="radio" NAME="aret" VALUE="self"> Just my own
|
||||
<INPUT TYPE="radio" NAME="aret" VALUE="all"> All the users
|
||||
<INPUT TYPE="radio" NAME="aret" VALUE="summ"> Detailed myself, summary all.<P>
|
||||
|
||||
Which of the following services would I like?<BR>
|
||||
<UL>
|
||||
<LI><INPUT TYPE="checkbox" NAME="c0">Birthday notification of other users
|
||||
<LI><INPUT TYPE="checkbox" NAME="c1">Voice email if I have a soundblaster
|
||||
<LI><INPUT TYPE="checkbox" NAME="c2">Open graphical noticeboard
|
||||
<LI><INPUT TYPE="checkbox" NAME="c3">Appointment reminder
|
||||
<LI><INPUT TYPE="checkbox" NAME="c4">Global telephone book
|
||||
<LI><INPUT TYPE="checkbox" NAME="c5">An Internet Relay Chat server
|
||||
<LI><INPUT TYPE="checkbox" NAME="c6">Automated software installation and updates
|
||||
<LI><INPUT TYPE="checkbox" NAME="c7">Voice navigation and dictation software
|
||||
<LI><INPUT TYPE="checkbox" NAME="c8">Examinations via computer terminals
|
||||
<LI><INPUT TYPE="checkbox" NAME="c9">Video lectures and Web notes
|
||||
<LI><INPUT TYPE="checkbox" NAME="c10">Video conferencing
|
||||
<LI><INPUT TYPE="checkbox" NAME="c11">Shared appointment books
|
||||
<LI><INPUT TYPE="checkbox" NAME="c12">Animated multimedia announcements
|
||||
<LI><INPUT TYPE="checkbox" NAME="c13">Student results on the web
|
||||
<LI><INPUT TYPE="checkbox" NAME="c14">Hardware and software monitoring on my station
|
||||
</UL>
|
||||
<HR>
|
||||
<INPUT TYPE="reset" VALUE="Clear Form"> <INPUT TYPE="submit" VALUE="Submit this long form to XXXXXXXX"><BR>
|
||||
</FORM>
|
||||
|
||||
<HR>
|
||||
There is <B>no</B> guarrantee that xxxxxxxx will accept you as a user. This service was brought to you by the creaters of the xxxxxx virtual server.
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
42
ohlogscr.bat
Normal file
42
ohlogscr.bat
Normal file
@ -0,0 +1,42 @@
|
||||
@ECHO OFF
|
||||
|
||||
rem DOS BATCH FILE
|
||||
rem File is called ohlogscr.bat and gets called with an exit "ohlogscr.bat"
|
||||
rem from the master mars login script....
|
||||
rem unix2dos this file before using it.
|
||||
|
||||
echo .
|
||||
rem
|
||||
rem I: is a map to the user directory.
|
||||
rem
|
||||
if not "%name%"=="SUPERVIS" goto aaa
|
||||
if not exist i:\users.usr goto aaa
|
||||
i:
|
||||
cd \
|
||||
cls
|
||||
echo Creating new users and destroying old ones.
|
||||
rem Use makeuser script from novell to create/destroy the new/old users
|
||||
makeuser users.usr
|
||||
type users.rpt | more
|
||||
copy users.old + users.usr users.lst > nul
|
||||
copy usrpt.old + users.rpt usrpt.lst > nul
|
||||
copy users.lst users.old > nul
|
||||
copy usrpt.lst usrpt.old > nul
|
||||
del users.rpt > nul
|
||||
del users.usr > nul
|
||||
f:
|
||||
pause
|
||||
|
||||
:aaa
|
||||
|
||||
rem
|
||||
rem Place your normal household stuff in here......
|
||||
rem all the variable names below gets created in the master login script
|
||||
|
||||
Echo ________________________________________________________________________
|
||||
echo Welcome %LONGNAME% driving on your %MACHINE% from IPX node %NETADDR%:%NODE%
|
||||
echo Your %OSTYPE% %OSVER% is far too outdated for THIS powerfull server!
|
||||
echo Your mailbox is %MBOX% and your temp directory is set to %TEMP%
|
||||
echo It looks like we're ready to rock and roll!!
|
||||
Echo ________________________________________________________________________
|
||||
|
17
ohmail
17
ohmail
@ -1,11 +1,26 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Purpose: This shell script will list all users logged in via samba or
|
||||
# mars and see if it needs to inform them about new mail waiting..
|
||||
# Please create a generic mail handling user on mars and customize this
|
||||
# script for your needs...
|
||||
#
|
||||
|
||||
marsserver="YourMarsServerName"
|
||||
mailusr="auseronmarsthathandlesmailnotification"
|
||||
mailusrpwd="passwordforyourgenericmailuser"
|
||||
|
||||
while [ true ] ;
|
||||
do
|
||||
nwuserlist -S $marsserver -U $mailusr -P $mailusrpwd > /tmp/nwusers.list
|
||||
smbstatus > /tmp/smbusers.list
|
||||
for x in `cat /etc/ohmaillist`
|
||||
do
|
||||
/usr/sbin/ohmessage $x
|
||||
sleep 1
|
||||
done
|
||||
|
||||
sleep 5
|
||||
sleep 120
|
||||
done
|
||||
|
||||
# ohmail needs to be installed in /usr/sbin together with ohmessage.
|
||||
|
230
ohmasteruser
Executable file
230
ohmasteruser
Executable file
@ -0,0 +1,230 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# adduser 1.0: a utility to add users to the system
|
||||
# Copyright (C) 1994 Ian A. Murdock <imurdock@shell.portal.com>
|
||||
# Sorry Ian, dud was ere.
|
||||
# Modified by Marc Ewing <marc@redhat.com> for RHS Linux
|
||||
# Modified by gac@eng.rau.ac.za, adw@chopin.rau.ac.za, fwo@eng.rau.ac.za,
|
||||
# eddie@rau.ac.za to work great with mars and samba
|
||||
|
||||
# Enhancements: Automagically creates user on mars server side....
|
||||
# Please edit the login script of supervisor user to link into this
|
||||
# script...
|
||||
# Updates a birthday reminder database
|
||||
# updates an expiry database
|
||||
# ensures an ftp-only shell
|
||||
|
||||
# Everything happens too fast, so don't let the user interrupt.
|
||||
trap "" 1 2 3 15
|
||||
|
||||
# Set a few important variables before getting started.
|
||||
NUMARG=$#
|
||||
LOGIN="$1"
|
||||
FNAME="$2"
|
||||
OFFICE="$3"
|
||||
WTEL="$4"
|
||||
HTEL="$5"
|
||||
BDATE="$6"
|
||||
EXIST=0
|
||||
NOHOME="$7"
|
||||
|
||||
PASSWD="/etc/passwd"
|
||||
PBAK="/etc/passwd-" # Some programs use /etc/passwd-, others use
|
||||
# /etc/passwd.OLD. Take your pick.
|
||||
|
||||
GROUP="/etc/group"
|
||||
GBAK="/etc/group-"
|
||||
|
||||
PLOCK="/etc/ptmp" # Standard method of locking the password file.
|
||||
|
||||
DSHELL="/etc/ftponly"
|
||||
DHOME="/hamster/home" # modify this to point to base home dirs.
|
||||
SKEL="/etc/skel"
|
||||
SPOOL="/var/spool/mail"
|
||||
FIRST_UID=500
|
||||
FIRST_GID=500
|
||||
|
||||
# A few sanity checks...
|
||||
if [ `id -u` != 0 ]; then
|
||||
echo "Only root may add users to the system." ; exit 1
|
||||
fi
|
||||
|
||||
if [ $NUMARG = 0 ]; then
|
||||
echo "You need to specify the login to add; for example, \`adduser" \
|
||||
"imurdock'." ;
|
||||
echo "e.g. ohmasteruser username fullname office worktel hometel birthdate";
|
||||
exit 1
|
||||
fi
|
||||
|
||||
id $LOGIN >/dev/null 2>/dev/null && EXIST=1
|
||||
|
||||
if [ $EXIST = 1 ]; then
|
||||
echo "The login $LOGIN already exists."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f $PLOCK ]; then
|
||||
echo "$PASSWD is locked. Try again later." ; exit 1
|
||||
fi
|
||||
|
||||
# And now the program begins:
|
||||
cp $PASSWD /etc/passwd.tmp
|
||||
cp $GROUP /etc/group.tmp
|
||||
echo "" ; echo -n "Looking for first available UID..."
|
||||
NUID=`cut -f 3 -d ":" $PASSWD | sort -n | awk -v uid=$FIRST_UID '
|
||||
{ if ($1 == uid) uid = uid + 1; }
|
||||
END { print uid; }
|
||||
'`
|
||||
|
||||
if [ $NUID -ge 65536 ]; then
|
||||
echo "Sorry, ran out of uids."
|
||||
exit 1
|
||||
fi
|
||||
echo " $NUID"
|
||||
|
||||
|
||||
echo -n "Looking for first available GID..."
|
||||
NGID=`cut -f 3 -d ":" $GROUP | sort -n | awk -v gid=$FIRST_GID '
|
||||
{ if ($1 == gid) gid = gid + 1; }
|
||||
END { print gid; }
|
||||
'`
|
||||
|
||||
if [ $NGID -lt $FIRST_GID ]; then
|
||||
NGID=$FIRST_GID
|
||||
fi
|
||||
echo " $NGID"
|
||||
|
||||
echo "" ; echo -n "Adding login: $LOGIN..."
|
||||
touch $PLOCK ;
|
||||
|
||||
cp $PASSWD $PBAK
|
||||
echo "$LOGIN:*:$NUID:$NGID:New User:$DHOME/./$LOGIN:$DSHELL" >> $PASSWD
|
||||
|
||||
# Add user to users group
|
||||
cp $GROUP $GBAK
|
||||
sed "s/^\(users.*[^:]\)\$/\1,$LOGIN/" < $GBAK |
|
||||
sed "s/^\(users.*:\)\$/\1$LOGIN/" > $GROUP
|
||||
|
||||
#sed "s/^\(users.*[^:]\)$/\1,$LOGIN/" < $GBAK |
|
||||
#sed "s/^\(users.*:\)$/\1,$LOGIN/" > $GROUP
|
||||
|
||||
# Add user to httpd group
|
||||
cp $GROUP $GBAK
|
||||
sed "s/^\(httpd.*[^:]\)\$/\1,$LOGIN/" < $GBAK |
|
||||
sed "s/^\(httpd.*:\)\$/\1$LOGIN/" > $GROUP
|
||||
|
||||
echo "$LOGIN::$NGID:$LOGIN" >> $GROUP
|
||||
|
||||
rm -f $PLOCK
|
||||
echo "done."
|
||||
|
||||
if [ "x$NOHOME" = "x" ]; then
|
||||
echo -n "Creating home directory: $DHOME/$LOGIN..."
|
||||
mkdir $DHOME/$LOGIN
|
||||
chmod 2770 $DHOME/$LOGIN
|
||||
cp -a $SKEL/.??* $SKEL/* $DHOME/$LOGIN >/dev/null 2>/dev/null
|
||||
chown -R $NUID.$NGID $DHOME/$LOGIN
|
||||
echo "done."
|
||||
fi
|
||||
|
||||
echo -n "Creating mailbox: $SPOOL/$LOGIN..."
|
||||
touch $SPOOL/$LOGIN ; chmod 660 $SPOOL/$LOGIN ; chown $NUID.mail $SPOOL/$LOGIN
|
||||
echo $LOGIN >> /etc/ohmaillist
|
||||
echo "0" > /tmp/mail/$LOGIN
|
||||
echo "Done.."
|
||||
|
||||
echo ""
|
||||
echo "Don't forget to set the password."
|
||||
if [ "x$NOHOME" != "x" ]; then
|
||||
echo ""
|
||||
echo "The home directory for $LOGIN was set to $DHOME/$LOGIN but the directory"
|
||||
echo "was not created. Be sure that you set it up properly."
|
||||
fi
|
||||
|
||||
if [ "x$FNAME" = "x" ] ; then # Added to show account expiry times..
|
||||
passwd $LOGIN # creates /etc/expiry
|
||||
chfn $LOGIN
|
||||
echo -n "Expiry date: (mm-yy) "
|
||||
read expiry
|
||||
echo "$LOGIN:$expiry" >> /etc/expiry
|
||||
echo -n "Birthdate: (e.g. Oct 24) "
|
||||
read BDATE
|
||||
echo "$LOGIN:$FNAME:$BDATE:Happy Birthday!" >> /etc/birthdays
|
||||
else
|
||||
# echo "default" | passwd -P $LOGIN
|
||||
FNAME=`echo "$FNAME" | sed 's/[,:]/ /g'`
|
||||
OFFICE=`echo "$OFFICE" | sed 's/[:,]/ /g'`
|
||||
WTEL=`echo "$WTEL" | sed 's/[:,]/ /g'`
|
||||
HTEL=`echo "$HTEL" | sed 's/[:,]/ /g'`
|
||||
chfn -f "$FNAME" -r "$OFFICE" -w "$WTEL" -h "$HTEL" $LOGIN
|
||||
expiry="12-97"
|
||||
echo "$LOGIN:$expiry" >> /etc/expiry
|
||||
echo "$LOGIN:$FNAME:$BDATE:Happy Birthday!" >> /etc/birthdays
|
||||
fi
|
||||
|
||||
echo -n "Creating an example www home page..."
|
||||
mkdir $DHOME/httpd/html/$LOGIN # point to your webroot
|
||||
chown $NUID.$NGID $DHOME/httpd/html/$LOGIN
|
||||
chmod 755 $DHOME/httpd/html/$LOGIN
|
||||
LONGNAME="`grep "^$LOGIN:" $PASSWD | cut -f 5 -d : - | cut -f 1 -d , -`"
|
||||
/usr/sbin/wwwhomepage "$LONGNAME" $LOGIN > $DHOME/httpd/html/$LOGIN/index.htm
|
||||
chown $NUID.httpd $DHOME/httpd/html/$LOGIN/index.htm
|
||||
chmod 755 $DHOME/httpd/html/$LOGIN/index.htm
|
||||
cp /etc/.htaccess $DHOME/httpd/html/$LOGIN/.htaccess
|
||||
chmod 644 $DHOME/httpd/html/$LOGIN/.htaccess
|
||||
chown root.httpd $DHOME/httpd/html/$LOGIN/.htaccess
|
||||
pushd . > /dev/null
|
||||
cd $DHOME/$LOGIN
|
||||
ln -s ../httpd/html/$LOGIN www
|
||||
popd > /dev/null
|
||||
echo "Done..."
|
||||
|
||||
echo "Updating myusers.html"
|
||||
$DHOME/httpd/cgi-bin/nph-users > /$DHOME/httpd/html/myusers.html
|
||||
chmod 755 $DHOME/httpd/html/myusers.html
|
||||
|
||||
# Now for the COOOL part: creates users in mars space so that when supervisor
|
||||
# logs on, new users are created automagically on the novell side so that
|
||||
# user is immediately available on mars.
|
||||
# Please have a look at the modified batch file that supervisor login script
|
||||
# points to.....
|
||||
|
||||
echo "Updating Novell user ID"
|
||||
echo -e "#NO_HOME_DIRECTORY\r\n" >> /hamster/home/supervis/users.usr
|
||||
|
||||
echo -e "#CREATE $LOGIN;$LONGNAME;default^\r\n" >> /hamster/home/supervis/users.usr
|
||||
|
||||
# Change nw-admin to your admin account on the mars side.
|
||||
|
||||
chown nw-admin.nw-admin /hamster/home/supervis/users.usr
|
||||
|
||||
# The following updates a dummy ftp passwd file that shows correct user and
|
||||
# group stuff when a user ftp's to the server
|
||||
|
||||
echo "Updating ftp passwd file"
|
||||
cat /etc/passwd | cut -f 1,3,4,5,6,7,8,9,10 -d : - | sed s/:/:*:/ > $DHOME/etc/passwd
|
||||
cp /etc/group $DHOME/etc/group
|
||||
|
||||
# The next section creates default disk storage space for users, using
|
||||
# user wvdw as template. Please man quota to see how disk quotas works..
|
||||
|
||||
echo "Applying system default disk storage quotas..."
|
||||
/usr/sbin/edquota -p wvdw $LOGIN
|
||||
|
||||
echo ""
|
||||
echo "Supervisor, please log on to the Mars server to update the user's Novell login."
|
||||
echo ""
|
||||
|
||||
# Some sanity checks, if the diff between count is more than one then this
|
||||
# script messed up.
|
||||
|
||||
echo "Word and linecount of passwd file:"
|
||||
wc /etc/passwd.tmp
|
||||
wc $PASSWD
|
||||
echo "Wordcount of group files:"
|
||||
wc /etc/group.tmp
|
||||
wc $GROUP
|
||||
|
||||
# Yip, we're fin..
|
||||
echo "OK, Patricia lets go!"
|
||||
# EOF
|
23
ohmessage
23
ohmessage
@ -1,19 +1,32 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Ohmessage: called by ohmail and creates a database of new mail flags
|
||||
# for users. Sends a message to mars or samba users informing them of
|
||||
# new mail
|
||||
# Please create a directory under /tmp called mail where the mail flags
|
||||
# will be stored..
|
||||
# log files will be stored in /var/log.
|
||||
|
||||
marsserver="yourmarsservername"
|
||||
mailusr="genericmailuseronmars"
|
||||
mailpwd="genericmailusrpasswd"
|
||||
|
||||
|
||||
s1="`cat /var/spool/mail/$1 | grep Subject | wc -l`"
|
||||
let s2=`cat /tmp/mail/$1`
|
||||
if let "$s1 > $s2"
|
||||
then
|
||||
if smbstatus | grep " $1 " > /dev/null
|
||||
if cat /tmp/smbusers.list | grep " $1 " > /dev/null
|
||||
then
|
||||
for machine in `smbstatus | grep " $1 " | awk ' {print $5}' | sort | uniq`
|
||||
for machine in `cat /tmp/smbusers.list | grep " $1 " | awk ' {print $5}' | sort | uniq`
|
||||
do
|
||||
echo "$1 has new mail `grep From: /var/spool/mail/$1 | tail --lines=1`" | smbclient -M $machine 2>&1 > /dev/null
|
||||
echo $s1 > /tmp/mail/$1
|
||||
echo "`date` -- Sent notification to SMB user $1 at $machine" >> /var/log/ohmessage.log
|
||||
done
|
||||
elif /usr/local/bin/nwuserlist -S ohamster -U ohmessage -P sendthemall | grep -i " $1 " > /dev/null
|
||||
elif cat /tmp/nwusers.list | grep -i " $1 " > /dev/null
|
||||
then
|
||||
/usr/local/bin/nsend -S ohamster -U ohmessage -P sendthemall $1 "New mail `grep From: /var/spool/mail/$1 | tail --lines=1`"
|
||||
/usr/local/bin/nsend -S $marsserver -U $mailusr -P $mailpwd $1 "New mail `grep From: /var/spool/mail/$1 | tail --lines=1`"
|
||||
echo $s1 > /tmp/mail/$1
|
||||
echo "`date` -- Sent notification to NetWare user $1" >> /var/log/ohmessage.log
|
||||
fi
|
||||
@ -21,4 +34,4 @@
|
||||
echo $s1 > /tmp/mail/$1
|
||||
fi
|
||||
|
||||
|
||||
# ohmessage by gac@eng.rau.ac.za, eddie@eng.rau.ac.za
|
||||
|
24
ohpostme
24
ohpostme
@ -1,6 +1,22 @@
|
||||
#!/bin/bash
|
||||
# (This is no more needed on the marsmail-02c)
|
||||
#
|
||||
# This script runs through all the user dirs to collect mail that needs to
|
||||
# be sent.
|
||||
# Pegasus mail for dos will use a gateway that places outgoing mail in
|
||||
# /home/username/pmail/out. All these messages will be picked up by this
|
||||
# script and mailed out.
|
||||
# Please create a file /etc/ohmaillist that contains valid users that
|
||||
# may send mail from dos pmail logged into mars.
|
||||
# (I added it to the adduser script so all users can have new mail)
|
||||
# Format of the ohmaillist file is just a single username per line
|
||||
|
||||
# Replace with the base dir of your home directories i.e. /home
|
||||
homedirs="/hamster/home"
|
||||
|
||||
# Replace with your domain name
|
||||
dm="eng.rau.ac.za"
|
||||
|
||||
#This script runs through all the user dirs to collect mail that needs to be sent.
|
||||
while [ true ] ;
|
||||
do
|
||||
cd /hamster/home
|
||||
@ -8,11 +24,13 @@ do
|
||||
do
|
||||
for x in `ls $l/pmail/out`
|
||||
do
|
||||
cat "$l/pmail/out/$x" | sed "1,4d" | /usr/sbin/sendmail -f "<$l@eng.rau.ac.za>" -t
|
||||
cat "$l/pmail/out/$x" | sed "1,4d" | /usr/sbin/sendmail -f "<$l@$dm>" -t
|
||||
rm "$l/pmail/out/$x"
|
||||
echo "`date` -- Mail message $x send from $l mailbox" >> /var/log/ohpostme.log
|
||||
done
|
||||
sleep 1
|
||||
done
|
||||
sleep 5
|
||||
sleep 7
|
||||
done
|
||||
|
||||
# ohmail - ends here
|
||||
|
113
ohquota
Executable file
113
ohquota
Executable file
@ -0,0 +1,113 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# ohQuota will send disk quota reports to mars and samba and other users
|
||||
# monthly at a certain time and update a html file that lists global disk
|
||||
# usage for users.
|
||||
# run this once a month through cron (see man cron)
|
||||
|
||||
# hbase is the base dir where you would like place the quotas.html file.
|
||||
hbase="/hamster/home/httpd/html/main/"
|
||||
|
||||
title="RAU Engineering" # Your organization's title
|
||||
srvname="OhMaster" # Your server's name
|
||||
fqdn="ohmaster.rau.ac.za" # full fqdn to your mail host
|
||||
adminemail="root@ohmaster.rau.ac.za" # email of the admin account
|
||||
wwwsite="www-ing.rau.ac.za/main" # urlpath to hbase
|
||||
|
||||
|
||||
# Month is the current month :)
|
||||
mnth=`date`
|
||||
dummy="youhavenoteditedthisscript"
|
||||
|
||||
if [ $dummy = youhavenoteditedthisscript ] ; then
|
||||
echo "Please edit this script to generate your OWN html file!"
|
||||
exit
|
||||
fi
|
||||
|
||||
cat <<OOOK > $hbase/quotas.html
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<!--#exec cgi="/cgi-bin/expiry-cgi" -->
|
||||
<TITLE>$title - Disk quotas for the slaves as on $mnth</TITLE></HEAD>
|
||||
<BODY background=<!--#exec cgi="/cgi-bin/randbg-cgi" -->
|
||||
>
|
||||
<IMG SRC="/eddie/oheng.gif" ALT="$title" HEIGHT=114 WIDTH=640><BR>
|
||||
<FONT SIZE=2>Cnr Ditton and Kingsway Ave, P.O. Box 524, Auckland Park, 2006, Tel
|
||||
: +27(11)-489-2016, Fax: +27(11)-489-2097
|
||||
</FONT><P><CENTER>
|
||||
<h3>Disk space usages for the slaves as on $mnth</h3>
|
||||
<I>These are the messy living quaters of the slaves and the amount of data lying
|
||||
around in their homeboxes</I>
|
||||
<P>
|
||||
A slave is granted 134,217,728 binary digits of space on the oh-so-precious fast wide scsi's of $srvname for their normal household information
|
||||
like spreadsheets, important email, scanned images etcetera etcetera.
|
||||
|
||||
Some slaves tend to leave data on the $srvname server without ever removing it.
|
||||
$srvname gets upset with old data and is busy trying to reduce all files older
|
||||
than one year on the server to 42 bytes, a magical number picked up from somewhere.
|
||||
|
||||
|
||||
<center><TABLE BORDER WIDTH=80%>
|
||||
<TD><B><I>User</I></B></TD><TD><B><PRE>Filesystem blocks quota limit grace files quota limit grace</PRE></B></TD></TR>
|
||||
OOOK
|
||||
for l in `cat /etc/ohmaillist | sort`
|
||||
#for l in eddie
|
||||
do
|
||||
dq=`/usr/sbin/quota $l`
|
||||
ddq=`/usr/sbin/quota $l | sed ' 1,2 d '`
|
||||
cat <<APESHIT >> $hbase/quotas.html
|
||||
<TR><TD>$l</TD><TD><PRE>$ddq</PRE></TD></TR>
|
||||
APESHIT
|
||||
|
||||
cat <<EEEEK # | /usr/sbin/sendmail -t
|
||||
From: $srvname Automated Disk Usage reporter <$adminemail>
|
||||
Reply-to: $adminemail
|
||||
To: $l@$fqdn <$l@$fqdn>
|
||||
Subject: $l's diskusage on $srvname
|
||||
X-Mailer: Automated disk Usage reporter script
|
||||
|
||||
Oh Yee my little slave
|
||||
|
||||
Greetings!
|
||||
|
||||
This is your friendly $srvname virtual server reporting:
|
||||
|
||||
Monthly account: Diskusage as on $mnth:
|
||||
|
||||
$dq
|
||||
|
||||
This is just a friendly reminder of your current disk usage. Don't panic.
|
||||
You only need to pay respects, no money, this is only for your records.
|
||||
|
||||
This disk usage account will be automatically sent out every month.
|
||||
Please remove your old data frequently from the server if it is not in
|
||||
constant use.
|
||||
|
||||
Point your URL to http://$wwwsite/quota.html to see the
|
||||
diskspace usage of all the users on $srvname.
|
||||
|
||||
Redirect any replies concerning diskspace usage to your smiling net-admin staff.
|
||||
This is a green service: this message will self destruct in 40 seconds.
|
||||
(Just kidding!)
|
||||
|
||||
EEEEK
|
||||
|
||||
|
||||
done
|
||||
cat <<POPO >> $hbase/quotas.html
|
||||
</TABLE></CENTER>
|
||||
<HR>
|
||||
<CENTER>
|
||||
<I><B><A HREF="/main/disclaim.htm">disclaimer:</A></B> $title believes
|
||||
in freedom of thought and speech. User
|
||||
webcontent is the responsibility of the user.</I><P>
|
||||
<FONT SIZE=-4>
|
||||
Last modified:
|
||||
<!--#echo var="LAST_MODIFIED" -->
|
||||
</FONT>
|
||||
</CENTER>
|
||||
</BODY>
|
||||
</HTML>
|
||||
POPO
|
||||
|
||||
|
5
ohsendnt
5
ohsendnt
@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# OhSendNt is a console broadcast tool to send messages from the unix console
|
||||
# to the network users. Usefull for sending broadcasts that server is going
|
||||
# down in 10 minutes or whatever :)
|
||||
#
|
||||
|
||||
messge=$1
|
||||
machs=$2
|
||||
|
52
pmail.bat
52
pmail.bat
@ -1,16 +1,38 @@
|
||||
@echo off
|
||||
if not exist i:\pmail\nul mkdir i:\pmail > nul
|
||||
if not exist i:\pmail\out\nul mkdir i:\pmail\out > nul
|
||||
if not exist i:\pmail\in\nul mkdir i:\pmail\in > nul
|
||||
set pmuser=%name%
|
||||
:SzLoop
|
||||
Echo Please wait -- converting mail from unix to dos format...
|
||||
rem chksz f:\unixmail\%name% %temp%\%name%
|
||||
unix2dos f:\unixmail\%name% > i:\pmail\in\mailfile.dos
|
||||
rem chksz f:\unixmail\%name% %temp%\%name% -c
|
||||
rem IF Errorlevel 1 goto SzLoop
|
||||
copy j:\dos\net\pmail\zero.txt f:\unixmail\%name% > nul
|
||||
j:\dos\net\pmail\marsmail.exe
|
||||
i:
|
||||
cd \pmail\in
|
||||
j:\dos\net\pmail\pmail.exe -a
|
||||
|
||||
rem This batch file gets called when a dos user wants to run pmail from
|
||||
rem a menu or command line.
|
||||
rem It calls marsmail.exe to convert the unix mail file into readable
|
||||
rem pmail messages.
|
||||
rem Need linked the unix /var/spool/mail to SYS:/unixmail
|
||||
rem 1/1000000 chance that user runs marsmail during a mail delivery
|
||||
rem that might damage the last message coming in... Anybody have any
|
||||
rem ideas?
|
||||
|
||||
rem variable name get's set in the master login script to the user's
|
||||
rem login name and the userid.
|
||||
set pmuser=%ln%
|
||||
set iduser=%id%
|
||||
|
||||
if not exist f:\mail\%id% mkdir f:\mail\%id% > nul
|
||||
|
||||
rem read the mail directly from the f:\unixmail\%ln% and let it on the
|
||||
rem f:\mail\%id%\<files>.cnm for pegasus mail
|
||||
|
||||
marsmail.exe
|
||||
rem if need routes, add it to the line before (g:\pmail\marsmail.exe)
|
||||
|
||||
rem Marsmail is the program that strips the unix mailfile appart and generates
|
||||
rem a index file and loose message files... Source is included... Please
|
||||
rem recompile to your needs...
|
||||
|
||||
rem zero.txt is a file zero bytes long but MUST exists in f:\mail !
|
||||
|
||||
copy f:\mail\zero.txt f:\unixmail\%name% > nul
|
||||
|
||||
rem call the pegasus mail reader in the natural mode
|
||||
echo Please move all the mail into folders!!!
|
||||
pause
|
||||
pmail.exe
|
||||
rem if need routes, add it to the line before (g:\pmail\pmail.exe)
|
||||
|
||||
|
BIN
unix2dos.exe
BIN
unix2dos.exe
Binary file not shown.
28
wwwhomepage
Executable file
28
wwwhomepage
Executable file
@ -0,0 +1,28 @@
|
||||
cat << EOF
|
||||
<HTML>
|
||||
<TITLE>$1's own WebPage!!</TITLE>
|
||||
<BODY BACKGROUND=/yourownbackground.gif>
|
||||
<CENTER><H1>$1's own WebPage</H1></CENTER>
|
||||
<FONT SIZE=5><CENTER><IMG SRC="/nicepict.jpg" ALT="">-- Hallo World! --<IMG SRC="/nicepict.jpg" ALT=""></CENTER>
|
||||
|
||||
<HR>
|
||||
<B>I</B> am a new user at The most PowerFull <i>Mars</i> File Server
|
||||
|
||||
<BR>
|
||||
<B>P</B>lease mail me at <A HREF="mailto:$2@your.domain.name">$2@your.domain.name</A>
|
||||
to say that you have actually visited my page.<P>
|
||||
|
||||
I <I>promise</I> to update this page as soon as I know I <I>have</I> one!<P>
|
||||
|
||||
<B>B</B>eing a new user on this system I will refrain from discussing any of the following topics on this page:<BR>
|
||||
<h3>Sex, Religion, Politics, Sport or Business.</H3>
|
||||
|
||||
<p>
|
||||
|
||||
<HR>
|
||||
</FONT>
|
||||
<HR>
|
||||
If you have a problem with this page <B> DON'T </B> mail the webmaster!
|
||||
</BODY>
|
||||
</HTML>
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user