[HPADM] SUMMARY: /etc/passwd question to create login id

From: Lal, Neeraj (neeraj_lal_at_mcgraw-hill.com)
Date: 03/25/04

  • Next message: Sudhansu Dora: "[HPADM] FW: load sharing on links to same APC"
    Date: Thu, 25 Mar 2004 11:18:56 -0500
    To: <hpux-admin@dutchworks.nl>
    
    

    Hi Thanks to all for quick response - Ling , Hartman, Pravez, John
     
    Everybody suggested that if the server is not trusted it will work just take care of uid i-e uid should be unique and have to create home dir . If trusted system look for tcb auth file also.
     
    Pravez also gave me script which he is using to create home dir
     
    # more create_home.sh
    #!/usr/bin/sh
    #
    cat /etc/passwd | while read line
    do
       USERNAME=$(echo $line | awk -F : '{print $1}')
       UID=$(echo $line | awk -F : '{print $3}')
       GID=$(echo $line | awk -F : '{print $4}')
       if [ $UID -gt 200 -a $UID -lt 600 ]
       then
          if [ ! -d /home/$USERNAME ]
          then
             GROUPNAME=$(cat /etc/group | grep $GID | awk -F : '{print $1}')
             mkdir /home/$USERNAME
             chown $USERNAME:$GROUPNAME /home/$USERNAME
             chmod 711 /home/$USERNAME
             cp /etc/skel/.cshrc /home/$USERNAME
             chown $USERNAME:$GROUPNAME /home/$USERNAME/.cshrc
             cp /etc/skel/.exrc /home/$USERNAME/.exrc
             chown $USERNAME:$GROUPNAME /home/$USERNAME/.exrc
             cp /etc/skel/.login /home/$USERNAME/.login
             chown $USERNAME:$GROUPNAME /home/$USERNAME/.login
             cp /etc/skel/.profile /home/$USERNAME/.profile
             chown $USERNAME:$GROUPNAME /home/$USERNAME/.profile
          else
             echo "User: $USERNAME UID:$UID GID:$GID"
          fi
       fi
    done
     
     
     
    -----Original Message-----
    From: hpux-admin-owner@DutchWorks.nl [mailto:hpux-admin-owner@DutchWorks.nl] On Behalf Of Lal, Neeraj
    Sent: Thursday, March 25, 2004 10:53 AM
    To: hpux-admin@dutchworks.nl
    Subject: [HPADM] /etc/passwd question to create login id
     
    Hi Admin
     
    I have a question
    If I will take the user info from etc passwd file (cut a line ) and append the same into passswd file on another server.
     
    My question
     
    1. what else would I have to do create the same user with same passwd on another server or this will not at all work.
     
    Thanks
     
     
    Neeraj. Lal.
    Consultant
    The McGraw-Hill Companies Inc
    148 Princeton-Hightstown Road
    Hightstown, NJ 08520
    email: neeraj_lal@mcgraw-hill.com <mailto:neeraj_lal@mcgraw-hill.com>
     

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Sudhansu Dora: "[HPADM] FW: load sharing on links to same APC"

    Relevant Pages

    • [HPADM] /etc/passwd question to create login id
      ... If I will take the user info from etc passwd file and append the same into passswd file on another server. ...
      (HP-UX-Admin)
    • Re: Need Suggestion
      ... One way is to do Server.Transfer to the user info page on server side. ... The link on the grid will fire just a postback, perhaps a RowCommand event, ... My app displays users in a GridView control. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Unidentified Invalid Logons in Security Log
      ... source by OWA,RWW,shared folder on server, if not,may someone try his ... The user Info only exists to catch email addressed to info@... ... The same Security Log Error is occuring repetatively at randon ... original post there is no source network address. ...
      (microsoft.public.windows.server.sbs)
    • Re: Tcp-wrapper question !
      ... > the passwd file. ... server or see files he/she shouln't see, ... FTP has commands to execute programs on the server, ...
      (Security-Basics)
    • Re: ftp question
      ... Are you using vsftpd with virtual users on the server? ... | After change this passwd file, ... Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org ...
      (Fedora)