Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Reads a file of user name and password pairs from standard input
and uses this information to update a group of existing users.
+config FEATURE_DEFAULT_PASSWD_ALGO
+ string "Default password encryption method (passwd -a, cryptpw -m parameter)"
+ default "des"
+ depends on PASSWD || CRYPTPW
+ help
+ Possible choices are "d[es]", "m[d5]", "s[ha256]" or "sha512".
+
config SU
bool "su"
default y
//usage: "\n -m Use MD5 encryption instead of DES"
//usage: )
+//TODO: implement -c ALGO
+
#if ENABLE_LONG_OPTS
static const char chpasswd_longopts[] ALIGN1 =
"encrypted\0" No_argument "e"
applet_long_options = mkpasswd_longopts;
#endif
fd = STDIN_FILENO;
- opt_m = "d";
+ opt_m = CONFIG_FEATURE_DEFAULT_PASSWD_ALGO;
opt_S = NULL;
/* at most two non-option arguments; -P NUM */
opt_complementary = "?2:P+";
};
unsigned opt;
int rc;
- const char *opt_a = "d"; /* des */
+ const char *opt_a = CONFIG_FEATURE_DEFAULT_PASSWD_ALGO;
const char *filename;
char *myname;
char *name;