rebuilding accounts

From: Johnson, Shaunn (SJohnson6_at_bcbsm.com)
Date: 04/29/04

  • Next message: Johnson, Shaunn: "book or primer for RHEL"
    To: "'General Red Hat Linux discussion list'" <redhat-list@redhat.com>
    Date: Thu, 29 Apr 2004 16:45:26 -0400
    
    
    

    Howdy:

    Running RHEL v.3.

    I'm moving user home directories to the new
    server and I need to add them to passwd / shadow
    and group files. I make a script like so:

    [snip]
    #!/bin/bash -x

    echo "building users account"
    echo " "

    for i in `cat /tmp/lusers.txt`
    do
    echo "making account for the user: $i"
    echo " "
    /usr/sbin/useradd -d /opt/home/$i -g users -M -p $i -s /bin/bash $i
    done
    [/snip]

    The when I try to su - <user>, I get 'su: incorrect password'.
    (note: I did this as a non-root user). I thought that
    maybe I should use single or double quotes when putting
    the password on the line, but the errors are always the same.

    Question: With useradd, is there a way to prompt users
    for a new password upon login? Otherwise, I will have
    to write some one-liner to use 'passwd' to generate
    default passwords.

    Thanks!

    -X

    
    

    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Johnson, Shaunn: "book or primer for RHEL"

    Relevant Pages

    • RE: PPP authentication brute-force attack?
      ... pppd call pppd-options password "$passwd" ... echo "Found password: $passwd" ...
      (Pen-Test)
    • how do i automate gpasswd?
      ... I can automate to enter passwd by (echo newpass;sleep 1;echo ... newpass|grep passwd), but if i apply the same over gpasswd, it gives ...
      (comp.os.linux.development.system)