The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Changing account passwords in a script

Discussion in 'General Discussion' started by nxds, Jun 23, 2006.

  1. nxds

    nxds Well-Known Member

    Joined:
    Jan 6, 2006
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Is it safe to change account passwords using just the UNIX passwd command instead of the Cpanel interface or a Cpanel script?

    I have a number of accounts with very weak passwords, and I want to write a script to change them all. I am thinking of using a password generator (like apg) and feeding the new passwords in through stdin like this:

    Code:
    while read user; do apg -x 8 -n 1 | passwd --stdin $user; done
    Is this OK or is there a better way?
     
  2. benito

    benito Well-Known Member

    Joined:
    Jan 8, 2004
    Messages:
    296
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Mar del Plata - Argentina
    hi! Did you find a better way to change all passwords? I need to do it, even the same hard password for every customer.
     
Loading...

Share This Page