Search Again:

Re: Telnet Settings

From: Michael Phillips
Date: Sunday, July 12, 1998
Time: 10:55:08 am

Got it working Shawn!

For those interested and who needs some pointers in the right direction here
is what I did:

First of all, my primary email host and radius host runs on RedHat 5.0.
OptiGold is running on Windows NT 4.0. NOTE: I have not accomplished the
addition/deletion/password change for radius files as of yet. This
capability will be included in the scripts where indicated. I will post
those addition as soon as I get it figured out. The buildexcep script call
is something I use to build a "spam" list so I can email my user base
concerning system info such as planned outages etc. The txpass simply copies
the /etc/passwd and /etc/raddb/users files to a second host that is our
backup machine.


CREATE ACCOUNT SCRIPT
=====================

Wait For Send Text
---------------------------
login: my login
Password: my password
$ su - root
Password: root's password
# aduser <Login> <FName> <LName>
# passwd <Login>
password: <Pass>
password: <Pass>
# exit
$ exit

CHANGE PASSWORD SCRIPT
======================
login: my login
Password: my password
$ su - root
Password: root's password
# passwd <Login>
password: <Pass>
password: <Pass>
# exit
$ exit

CANCEL ACCOUNT SCRIPT
======================
login: my login
Password: my password
$ su - root
Password: root's password
# deluser <Login>


REDHAT ADUSER SCRIPT
====================

#!/bin/bash
#
# adduser 1.3: a utility to add users to the system
#
# Copyright (C) 1994 Ian A. Murdock <imurdock@shell.portal.com>
#
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Written for the Debian Linux distribution (01/21/94). Feel free to use
# it in YOUR distribution, too. :) Please note that this is just a simple
# script that _somewhat_ automates the really boring and repetitive task
# of creating new user accounts. It makes no attempt to be sophisticated.
# Let me know if you improve it in any way.
#
# I need to write a man page for this.
#
# Modified by Marc Ewing <marc@redhat.com> for RHS Linux
# Modified by Michael K. Johnson <johnsonm@redhat.com> for optional
# shadow password support.

# 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"
EXIST=0

FNAME="$2"
LNAME="$3"

PLOCK="/etc/.pwd.lock" # Standard method of locking the password file.

# 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'." ; 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
touch $PLOCK ;

useradd -c "$FNAME $LNAME" -g 100 -M -s /bin/false $LOGIN

rm -f $PLOCK

#
# Here is where I will add the radius stuff
#

#rebuild broadcast list
/root/bin/buildexcep

# transfer the files over to desoto
/root/bin/txpass

# EOF


REDHAT DELUSER SCRIPT
=====================

#!/bin/bash
#
# 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"
EXIST=0

userdel $LOGIN
rm -r /var/spool/mail/$LOGIN

#
# Here is where I will add the radius stuff
#

#rebuild broadcast list
/root/bin/buildexcep

# transfer the files over to desoto
/root/bin/txpass

# EOF


Hope this helps everyone who has had trouble getting this going!

Mike

----------------------------------------------
Michael Phillips KF4PFW
Coosa Valley Internet Services
302 E Coosa St. Talladega, AL 35160
mike@coosavalley.net 256-362-3190



Messages In This Thread:



Return to Digital Point Solutions' Home Page