.TH KEY2ROOT 8 key2root-addkey .SH NAME key2root-addkey - add a keyfile for privilege escalation with key2root .SH SYNOPSIS .B key2root-addkey [-r] .RI (user .I key-name .RI [ crypt-parameters ] | -h .I user .I key-name .IR key-hash ) .SH DESCRIPTION The .B key2root-addkey utility takes a keyfile from the standard input and it to a database of keyfiles that may be used to authenticate the specified .I user for privilege escalation with the .BR key2root (8) utility. .SH OPTIONS The .B key2root-addkey utility conforms to the Base Definitions volume of POSIX.1-2017, .IR "Section 12.2" , .IR "Utility Syntax Guidelines" . .PP The following option is supported: .TP .B -r Allow the keyfile to replace an existing keyfile with the same name. .SH OPERANDS The following operands are supported: .TP .I user The user the keyfile shall be added for. This can either be a user ID or a user name. .TP .I key-name The name the keyfile shall be given. May not include whitespace characters. .TP .I crypt-parameters .BR libar2simplified_crypt (3) parameters that the keyfile shall be hashed with. .TP .I key-hash .BR key2root-crypt (8) hash of the keyfile. .SH STDIN The .B key2root-addkey utility reads the keyfile to add from standard input, which must not be a TTY. However if the .B -h option is used, the standard input is not used and may be a TTY. .SH INPUT FILES None. .SH ENVIRONMENT VARIABLES No environment variables affect the execution of .BR key2root-addkey . .SH ASYNCHRONOUS EVENTS Default. .SH STDOUT The .B key2root-addkey utility does not use the standard output. .SH STDERR The standard error is used for diagnostic messages. .SH OUTPUT FILES None. .SH EXTENDED DESCRIPTION None. .SH EXIT STATUS If the .B key2root-addkey utility fails it will exit with one of the following statuses: .TP 0 Successful completion. .TP 1 A error occurred. .SH CONSEQUENCES OF ERRORS Default. .SH APPLICATION USAGE None. .SH EXAMPLES None. .SH RATIONALE None. .SH NOTES None. .SH BUGS None. .SH FUTURE DIRECTIONS None. .SH SEE ALSO .BR key2root (8), .BR key2root-crypt (8), .BR key2root-lskeys (8), .BR key2root-rmkey (8) .SH AUTHORS Mattias Andrée .RI < m@maandree.se >