Change users password
-
Hello,
I need to change my users password on command line, to put it in a script, passwd does not work for me. can you help me please.
thnx
-
UP !!
Need help plz -
From /etc/inc/auth.inc:
/* root user special handling */ if ($user_uid == 0) { $cmd = "/usr/sbin/pw usermod -q -n root -s /bin/sh -H 0"; if($debug) log_error(sprintf(gettext("Running: %s"), $cmd)); $fd = popen($cmd, "w"); fwrite($fd, $user['password']); pclose($fd); }
-
@Amirkabir:
From /etc/inc/auth.inc:
/* root user special handling */ if ($user_uid == 0) { $cmd = "/usr/sbin/pw usermod -q -n root -s /bin/sh -H 0"; if($debug) log_error(sprintf(gettext("Running: %s"), $cmd)); $fd = popen($cmd, "w"); fwrite($fd, $user['password']); pclose($fd); }
ive tried but it does not work
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.