On Thu, Oct 09, 2014 at 06:22:05PM +0100, Nux! wrote: > Hello, > > I'm trying to get some scripts working which would take a password from stdin > and set it for root. > In Linux "passwd --stdin" is used, in FreeBSD "pw mod user root -h 0". How > would I do this in OpenBSD? > > Thanks, > Lucian >
Hi, You could use encrypt(1) + usermod(1). encrypt will encrypt passwords from the command line or standard input. usermod will accept an already-encrypted password. -- Sébastien Marie