From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: "Russ Cox" To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] auth trouble to sources Date: Wed, 29 May 2002 14:33:10 -0400 Topicbox-Message-UUID: 9f444e50-eaca-11e9-9e20-41e7f4b1d025 if you're having trouble authenticating, this will help you figure out whether the problem is ndb or your password. if this program successfully connects, then it's probably that your password has been mangled/forgotten/etc. g% cat x.c #include #include #include #include void main(void) { int fd; char *addr; char server[Ndbvlen]; Ndbtuple *nt; nt = csgetval("/net", "authdom", "outside.plan9.bell-labs.com", "auth", server); if(nt == nil){ print("csgetval failed: %r\n"); exits("csgetval"); } print("auth %s\n", server); addr = netmkaddr(server, nil, "ticket"); print("addr %s\n", addr); fd = dial(addr, 0, 0, 0); if(fd >= 0) print("connected\n"); else print("dial failed: %r\n"); } g% 8c x.c g% 8l x.8 g% 8.out auth sources.cs.bell-labs.com addr net!sources.cs.bell-labs.com!ticket connected g%