Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Off topic- UNIx question

RE: Off topic- UNIx question

From: Kirsh, Gary <gary.kirsh_at_gs.com>
Date: Fri, 11 Aug 2000 11:27:02 -0400
Message-Id: <10586.114373@fatcity.com>


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



From: Khedr, Waleed[SMTP:Waleed.Khedr_at_fmr.com] Reply To: ORACLE-L_at_fatcity.com
Sent: Thursday, August 10, 2000 2:10 PM
To:     Multiple recipients of list ORACLE-L 
Subject:        RE: Off topic- UNIx question 

	Why not using the supplied commands like useradd? 

	-----Original Message----- 

Sent: Thursday, August 10, 2000 10:37 AM To: Multiple recipients of list ORACLE-L

        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 Lists 

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: 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).

------_=_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><SPAN 
class=071172415-11082000></SPAN></FONT>&nbsp;</DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=071172415-11082000>Here's a basic script I used in the past.&nbsp; 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 color=#0000ff face=Arial size=2><SPAN class=071172415-11082000></SPAN></FONT>&nbsp;</DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=071172415-11082000><FONT face="Courier New" size=2>&nbsp;</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>&nbsp;</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 quotes 
if &gt;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>&nbsp;</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><SPAN 
class=071172415-11082000>Gary</SPAN></FONT></DIV> <DIV><FONT color=#0000ff face=Arial size=2><SPAN class=071172415-11082000></SPAN></FONT>&nbsp;</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>Next 
Extent, Inc</SPAN></FONT></DIV>
<BLOCKQUOTE>
  <DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma   size=2>-----Original Message-----<BR><B>From:</B> Uma Sankara_Sivadanam   [mailto:UmaSankara_Sivadanam_at_satyam.com]<BR><B>Sent:</B> Friday, August 11,   2000 2:35 AM<BR><B>To:</B> Multiple recipients of list   ORACLE-L<BR><B>Subject:</B> RE: Off topic- UNIx question<BR><BR></DIV></FONT>   <P><FONT color=#0000ff face=Arial size=2>hi,</FONT> </P>   <P><FONT color=#0000ff face=Arial size=2>I can.Since we are getting a new Unix   Machine and as i have to port 230 users from&nbsp; the existing unix box to   the new box, i require a script to run it in a loop for all the 230   accounts.</FONT></P>
  <P><FONT color=#0000ff face=Arial size=2>uma</FONT> </P>   <UL>
    <P><FONT face="MS Sans Serif" size=1>----------</FONT> <BR><B><FONT     face="MS Sans Serif" size=1>From:</FONT></B> &nbsp; <FONT     face="MS Sans Serif" size=1>Khedr, Waleed[SMTP:Waleed.Khedr_at_fmr.com]</FONT>     <BR><B><FONT face="MS Sans Serif" size=1>Reply To:</FONT></B>     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT face="MS Sans Serif"     size=1>ORACLE-L_at_fatcity.com</FONT> <BR><B><FONT face="MS Sans Serif"     size=1>Sent:</FONT></B> &nbsp; <FONT face="MS Sans Serif" size=1>Thursday,     August 10, 2000 2:10 PM</FONT> <BR><B><FONT face="MS Sans Serif"
    size=1>To:</FONT></B> &nbsp;&nbsp;&nbsp; <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> 
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <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>

    <P><FONT face=Arial size=2>Hi, </FONT></P>     <P><FONT face=Arial size=2>Is any one of you having a script that will     automatically create users on a</FONT> <BR><FONT face=Arial size=2>uni     box(preferably on&nbsp; SUNOS).Script should give all the details     like</FONT> <BR><FONT face=Arial size=2>existing groups and userid's and     prompt the administrator&nbsp; for input.I have</FONT> <BR><FONT face=Arial     size=2>written one a year back but last it as i became a DBA from Unix     Admin.</FONT> </P>
    <P><FONT face=Arial size=2>Any site where these kind of scripts available is     also OK. </FONT></P>
    <P><FONT face=Arial size=2>Thanks in advance </FONT><BR><FONT face=Arial     size=2>Uma Shankar </FONT></P>
    <P><FONT face=Arial size=2>-- </FONT><BR><FONT face=Arial size=2>Author:     Khedr, Waleed</FONT> <BR><FONT face=Arial size=2>&nbsp; INET:     Waleed.Khedr_at_FMR.COM</FONT> </P>
    <P><FONT face=Arial size=2>Fat City Network Services&nbsp;&nbsp;&nbsp; --     (858) 538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT face=Arial     size=2>San Diego, California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --     Public Internet access / Mailing Lists</FONT> <BR><FONT face=Arial
    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).&nbsp; You may</FONT> <BR><FONT face=Arial Received on Fri Aug 11 2000 - 10:27:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US