Passwdd Daemon Protocol


I. Passwdd side:

Receive
or send
Data typeData labelData valueAction after send or receive and notes
1outByteWelcome'+'-
2inString1Login--
3inPassword2Password--
4outByteResultsee below-
4outByteResult'!'Go ahead.
4outByteResult'^'Login failed, terminate conversation.
5inByteAction-Conversation depends on this byte.
5inByteAction'n'Nothing. Jump to p. 6, first option.
5inByteAction'c'Change user password.
5.1inStringUser--
5.2inPasswordPassword-New password.
5.3inIntegerMin-Days until change allowed.
5.4inIntegerMax-Days before change required.
5.5inIntegerWarn-Days to warn.
5.6inIntegerInact-Days to disable.
5.7outByteResult'-'No such user.
5.7outByteResult'~'No rights to do this.
5.7outByteResult'*'Password still unchanged. Error.
5.7outByteResult'$'Weak password.
5.8outStringObscure-Obscure string.
5inByteAction'r'Change group password.
5.1inStringUser--
5.2inPasswordPassword-New password.
5.8outByteResult'-'No such group.
5.8outByteResult'~'No rights to do this.
5.8outByteResult'*'Password still unchanged. Error.
5.8outByteResult'$'Weak password.
5.9outStringObscure-Obscure string.
5inByteAction'a'Add user.
5.1inStringUser--
5.2inStringGecos--
5.3inStringDirectory--
5.4inStringShell--
5.5inIntegerUser ID--
5.6inIntegerGroup ID--
5.7outByteResultsee belowTerminate.
5.7outByteResult'+'User added.
5.7outByteResult'-'Duplicate name.
5.7outByteResult'*'User not added. Error.
5.7outByteResult'~'No rights to do this.
5.7outByteResult':'Bad shell.
5.7outByteResult';'Error making directory.
5inByteAction'b'Add group.
5.1inStringUser--
5.2inStringMembers--
5.3inStringAdministrators--
5.4outByteResultsee belowTerminate.
5.4outByteResult'+'Group added.
5.4outByteResult'-'Duplicate name.
5.4outByteResult'*'Group not added. Error.
5.4outByteResult'~'No rights to do this.
5inByteAction'd'Delete user.
5.1inStringUser--
5.2outByteResultsee belowTerminate.
5.2outByteResult'+'User deleted.
5.2outByteResult'-'No such user.
5.2outByteResult'*'User not deleted. Error.
5.2outByteResult'~'No rights to do this.
5inByteAction'e'Delete group.
5.1inStringUser--
5.2outByteResultsee belowTerminate.
5.2outByteResult'+'Group deleted.
5.2outByteResult'-'No such group.
5.2outByteResult'*'Group not deleted. Error.
5.2outByteResult'~'No rights to do this.
5inByteAction'l'Chfn.
5.1inStringUser--
5.2inStringFull name--
5.3inStringRoom number--
5.4inStringWork phone--
5.5inStringHome phone--
5.6inStringOther--
5.7outByteResultsee belowTerminate.
5.7outByteResult'+'Chfn completed.
5.7outByteResult'-'No such user.
5.7outByteResult'*'Error.
5.7outByteResult'~'No rights to do this.
5inByteAction'g'Get group.
5.1inStringUser--
5.2outStringGroup-Empty string on error.
5.3outByteResultsee belowTerminate.
5.3outByteResult'+'OK.
5.3outByteResult'-'No such user.
5.3outByteResult'~'No rights to do this.
5inByteAction'k'Get public key3.
5.1outByteResultsee below-
5.1outByteResult'+'OK.
5.1outByteResult'*'Error. Terminate if error.
5.2outStringPublic key--
6outByteResultsee below-
6outByteResult'#'Good bye, terminate.
6outByteResult'?'Invalid action, terminate.

1NULL Terminated string
2RSA encrypted string. Sent are m blocks, each n words (word is 32 bit unsigned integer). The first word indicated the length in bytes of the remaining data.
3The login name for the public key is "@key@" and then the password is skipped. 4All integer fields are in network byte order.