d63620e5406e2ba818e81cf92ec53b8ad5f91b44
[libnss-afs.git] / README
1
2 #
3 #  Below is the README from libnss-ptdb, from which libnss-afs
4 #  was derived.
5 #
6
7
8 |NSS Module for AFS
9 +------------------
10
11 What is it?
12 -----------
13
14 This package will let your applications use the AFS-Protection-Database
15 (PTDB) as a unix user-database. It consists of 2 binary parts:
16
17 1. The ptdbnssd, a daemon that clients may connect to by
18    udp://localhost:6998 to find out the UID for a usename or vice versa
19 2. The 'ptdb'-nss-module (libnss-ptdb) that will connect to ptdbnssd,
20    whenever it needs to lookup a username or a UID.
21
22 libnss-ptdb will provide user homedirectories which are determined using
23 one of 2 methods (see below). Further more it provides a login shell
24 which is determined using one of 3 methods.
25
26 As a bonus, this package provides a group-nss-plugin, assigning descriptive
27 names to PAG-groups (i.e. "AfsPag-1121" ).
28
29 My main intention for writing this module was to provide a really simple
30 way of providing user accoung information to AFS-client machines. I wanted
31 to avoid using ldap withing the Instantafs-Project.
32 Visit http://instantafs.cbs.mpg.de for more information about InstantAFS.
33
34 What about the homedirectories and login shells?
35 ------------------------------------------------
36
37 Homedirectories are determined by the nss-plugin but the configuration is done
38 by ptdbnssd. ptdbnssd accepts the parameters '-H' and '-S' to select a
39 method of determining homedirectories/login shells. Whenever a nss-plugin does
40 a lookup (either by uid or by name) ptdbnssd sends the current configuration
41 (basically: what you defined as -H and -S parameters) to the nss-plugin.
42 The Plugin then calculates the homedirectory and login shell on its own.
43
44 The advantage of that concept is that filesystem-accesses are always done by
45 user programs, not locking ptdbnssd for other lookups. On the other hand,
46 it's possible to change the homedir/loginshell-policy by restarting ptdbnssd
47 host wide instantaniously.
48
49 When using debian, just edit /etc/default/ptdbnssd to change the policy.
50
51 What do I have to do to get it working?
52 ---------------------------------------
53
54 Set up the AFS-client on your local computer. You must have a file
55 "/etc/openafs/ThisCell" containing *only* the full name of your
56 local cell.
57
58 You need glibc- and openafs-headers (debian-packages glibc6-dev and
59 libopenafs-dev).
60
61 Type that:
62
63 # make
64 # make install
65
66 Run the deamon (consider running it as an unprivileged user):
67
68 $ /usr/bin/ptdbnssd
69
70 Use /usr/lib/libnss-ptdb/nsstest to check, if ptdbnssd and the nss-module
71 are working correctly. If not, /usr/lib/libnss-ptdb/cstest helps you
72 to find out, if it's the deamon's fault.
73
74 Modify /etc/nsswitch.conf , you need to rewrite the "passwd"- and the group-line:
75
76 passwd: files ptdb
77 group: pag files
78
79 Now use 'ls -l /afs/some/directory' to see, if it's working.
80
81 Note: 'pag' should be the first group-plugin. The group name of PAG-groups is
82       calculated from their gid which is faster than i.e. a /etc/group-lookup.
83
84 Debugging
85 ---------
86
87 After building the package there are two additional binaries:
88    * cstest - Tries to resolve ID or username given at cmdline
89               by calling ptdbnssd directly
90    * nsstest - Tries to resolve ID or username given at cmdline
91                by using nss (libc name resolution).
92
93 Last words
94 ----------
95
96 The code was heavily "inspired" by Todd M. Lewis' (*) nss_pts_0.2 - Thank
97 you very much, Todd :-) .
98
99 (*) can be found @ http://www.unc.edu/~utoddl
100
101 If you have any questions, suggestions, patches, ... feel free to send me
102 an eMail.
103
104 Everything contained in this package is released under the terms of the
105 GNU Lesser General Public License (see COPYING).
106
107 Good luck,
108
109  -- Frank Burkhardt <burk@cbs.mpg.de>  Fri, 06 Apr 2007 11:45:23 +0200