Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Off topic- UNIx question
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C003A8.98DC3010
Content-Type: text/plain;
charset="iso-8859-1"
Uma,
Here's a basic script I used in the past. In this case, I assigned all users the same home directory and group, but you parameterize those and maybe flesh this out a bit.
if [ $# -ne 2 ]; then
echo
echo "Usage: add_user username \"Description\"
where username =\tthe login name to be create
\"Description\" =\tthe user's full name (must be in quotes if >1 word)"
exit
fi
useradd -d /home/finapp -g finuser -c "$2" -s /sbin/sh $1
passwd -d $1
HTH,
Gary
Gary Kirsh
Next Extent, Inc
-----Original Message-----
From: Uma Sankara_Sivadanam [mailto:UmaSankara_Sivadanam_at_satyam.com]
Sent: Friday, August 11, 2000 2:35 AM
To: Multiple recipients of list ORACLE-L
Subject: RE: Off topic- UNIx question
hi,
I can.Since we are getting a new Unix Machine and as i have to port 230 users from the existing unix box to the new box, i require a script to run it in a loop for all the 230 accounts.
uma
To: Multiple recipients of list ORACLE-L Subject: RE: Off topic- UNIx question Why not using the supplied commands like useradd? -----Original Message-----
Hi,
Is any one of you having a script that will automatically create
users on a
uni box(preferably on SUNOS).Script should give all the details like
existing groups and userid's and prompt the administrator for input.I have
written one a year back but last it as i became a DBA from Unix Admin.
Any site where these kind of scripts available is also OK.
Thanks in advance
Uma Shankar
--
Author: Khedr, Waleed
INET: Waleed.Khedr_at_FMR.COM
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
------_=_NextPart_001_01C003A8.98DC3010
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <TITLE>RE: Off topic- UNIx question</TITLE> <META content="MSHTML 5.00.2722.2800" name=GENERATOR></HEAD><BODY>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=071172415-11082000>Uma,</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPANclass=071172415-11082000></SPAN></FONT> </DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=071172415-11082000>Here's a basic script I used in the past. In this case, I assigned all users the same home directory and group, but you parameterize those and maybe flesh this out a bit.</SPAN></FONT></DIV>
<DIV><FONT face=Arial>if [ $# -ne 2 ]; then </FONT></DIV> <DIV><FONT face=Arial>echo </FONT></DIV> <DIV><FONT face=Arial>echo "Usage: add_user username \"Description\" </FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial>where username =\tthe login name to be create </FONT></DIV> <DIV><FONT face=Arial>\"Description\" =\tthe user's full name (must be in quotesif >1 word)" </FONT></DIV>
<DIV><FONT face=Arial>exit </FONT></DIV> <DIV><FONT face=Arial>fi </FONT></DIV> <DIV><FONT face=Arial>useradd -d /home/finapp -g finuser -c "$2" -s /sbin/sh $1 </FONT></DIV> <DIV><FONT face=Arial>passwd -d $1 </FONT></DIV> <DIV></FONT></SPAN></FONT> </DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=071172415-11082000>HTH,</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPANclass=071172415-11082000>Gary</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=071172415-11082000></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=071172415-11082000>Gary Kirsh</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=071172415-11082000>NextExtent, Inc</SPAN></FONT></DIV>
size=1>To:</FONT></B> <FONT face="MS Sans Serif" size=1>Multiple recipients of list ORACLE-L</FONT> <BR><B><FONT face="MS Sans Serif" size=1>Subject:</FONT></B> <FONT face="MS Sans Serif" size=1>RE: Off topic- UNIx question</FONT> </P> <P><FONT face=Arial size=2>Why not using the supplied commands like useradd?</FONT> </P>
<P><FONT face=Arial size=2>-----Original Message-----</FONT> <BR><FONT face=Arial size=2>Sent: Thursday, August 10, 2000 10:37 AM</FONT> <BR><FONT face=Arial size=2>To: Multiple recipients of list ORACLE-L</FONT> </P><BR><BR>
size=2>--------------------------------------------------------------------</FONT><BR><FONT face=Arial size=2>To REMOVE yourself from this mailing list, send an E-Mail message</FONT> <BR><FONT face=Arial size=2>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in</FONT> <BR><FONT face=Arial size=2>the message BODY, include a line containing: UNSUB ORACLE-L</FONT> <BR><FONT face=Arial size=2>(or the name of mailing list you want to be removed from). You may</FONT> <BR><FONT face=Arial Received on Fri Aug 11 2000 - 10:27:02 CDT