#include <u.h>
#include <libc.h>
#include <auth.h>
void
main(int argc, char *argv[])
{
UserPasswd *up;
ARGBEGIN{
}ARGEND
if(argc != 2){
fprint(2, "usage: aux/getpass service dom\n");
exits("usage");
}
up=auth_getuserpasswd(auth_getkey, "proto=pass service=%s server=%q", argv[0], argv[1]);
if(up == nil)
sysfatal("factotum cannot get key %r");
print("%s %s\n", up->user, up->passwd);
exits(nil);
}
|