Hi,
Thank you for your answer.
usermod needs a login name rather than the userid and you don't need -u
option:
# usermod -p $PASS postgres
I tried that but didn't work for me:
"[root@mail ~]# usermod -p $PASS postgres
usage: usermod [-u uid [-o]] [-g group] [[-a] -G group,...]
[-d home [-m]] [-s shell] [-c comment] [-l new_name]
[-f inactive] [-e expire ] [-p passwd] [-L|-U] name"
However, I usually user chpasswd to change the password from a script, so
your script becomes:
# echo postgres:secret | chpasswd
But this does :)
Thanks a bunch.
Warm Regards,
Mário Gamito
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Newbie]
[Audio]
[Hams]
[Kernel Newbies]
[Util Linux NG]
[Security]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite Photos]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Linux Device Drivers]
[Samba]
[Video 4 Linux]
[Git]
[Linux Resources]
[Fedora Users]