gdp / apps / gdp-name-add.8 @ master
History | View | Annotate | Download (4.21 KB)
1 |
.Dd August 2, 2015 |
---|---|
2 |
.Dt GDP-NAME-ADD 8 |
3 |
.Os Swarm-GDP |
4 |
.Sh NAME |
5 |
.Nm gdp-name-add |
6 |
.Nd add entry to human-oriented to GDP-oriented name directory |
7 |
.Sh SYNOPSIS |
8 |
.Nm gdp-name-add |
9 |
.Op Fl d |
10 |
.Op Fl D Ar debug-spec |
11 |
.Op Fl H Ar database-host-name |
12 |
.Op Fl p Ar database-password |
13 |
.Op Fl P Ar database-password-file |
14 |
.Op Fl q |
15 |
.Op Fl u Ar database-user-name |
16 |
.Ar human-name |
17 |
.Op Ar gdp-name |
18 |
.Sh DESCRIPTION |
19 |
.Nm |
20 |
adds an entry to the mapping database for |
21 |
.Ar human-name |
22 |
to |
23 |
.Ar gdp-name |
24 |
or deletes an entry for a particular |
25 |
.Ar human-name . |
26 |
GDPnames are represented as base64-encoded 256-bit tokens; |
27 |
human names are arbitrary user-supplied text, |
28 |
typically formatted as a reversed DNS-style name, |
29 |
e.g., |
30 |
.Dq edu.berkeley.eecs.eric.test.01 . |
31 |
.Pp |
32 |
The password for the |
33 |
.Ar database-user-name |
34 |
is read from the keyboard. |
35 |
This does |
36 |
.Em not |
37 |
use the |
38 |
.Va swarm.gdp.hongdb.passwd |
39 |
administrative parameter since that is for the account that reads the database, |
40 |
not the account that writes the database. |
41 |
.Pp |
42 |
This is strictly for debugging and administration; |
43 |
the log creation service should do this for ordinary users. |
44 |
.Ss "Warning" |
45 |
This implementation is likely to change or go away entirely in the future, |
46 |
and the command will probably be subsumed into a swarm service. |
47 |
.Sh OPTIONS |
48 |
.Bl -tag |
49 |
. |
50 |
.It Fl d |
51 |
Delete rather than add a directory entry. |
52 |
If specified, the |
53 |
.Ar gdp-name |
54 |
argument must not be specified. |
55 |
If not specified, the |
56 |
.Ar gdp-name |
57 |
argument must be specified. |
58 |
. |
59 |
.It Fl D Ar debug-spec |
60 |
Turns on debugging flags using the libep-style format. |
61 |
Useful only with the code in hand. |
62 |
. |
63 |
.It Fl H Ar database-host-name |
64 |
The DNS name of the host that maintains the database. |
65 |
This overrides the |
66 |
.Va swarm.gdp.hongdb.host |
67 |
runtime administrative parameter. |
68 |
. |
69 |
.It Fl p Ar database-password |
70 |
The password for the database account used to update the database. |
71 |
If this is not set, the |
72 |
.Fl P |
73 |
is is consulted. |
74 |
. |
75 |
.It Fl P Ar database-password-file |
76 |
The name of a file containing the database password. |
77 |
This is more secure than using |
78 |
.Fl p |
79 |
since the password will not show up in a |
80 |
.Xr ps 1 |
81 |
output. |
82 |
If not specified and |
83 |
.Fl d |
84 |
is not set, |
85 |
defaults to the value of the |
86 |
.Va swarm.gdp.creation-service.passwd-file |
87 |
administrative parameter, |
88 |
which in turn defaults to |
89 |
.Pa /etc/gdp/creation_service_pw.txt . |
90 |
If |
91 |
.Fl d |
92 |
is set, defaults to the value of the |
93 |
.Va swarm.gdp.hongd.admin.passwd-file |
94 |
administrative parameter, which in turn defaults to |
95 |
.Pa /etc/gdp/hongd_admin_pw.txt . |
96 |
If these files cannot be read, |
97 |
the command invoker will be prompted for a password. |
98 |
. |
99 |
.It Fl u Ar database-user-name |
100 |
The name of the database user to update the database. |
101 |
This must have INSERT (if |
102 |
.Fl d |
103 |
is not specified or |
104 |
DELETE |
105 |
(if |
106 |
.Fl d |
107 |
is specified) |
108 |
permission on the mapping table. |
109 |
Defaults to the value of the |
110 |
.Va swarm.gdp.creation-service.user |
111 |
or |
112 |
.Va swarm.gdp.hongd.admin.user |
113 |
administrative parameters depending on whether |
114 |
.Fl d |
115 |
is specified. |
116 |
Note that this are different users from that specified in the |
117 |
.Va swarm.gdp.hongdb.user |
118 |
parameter. |
119 |
.El |
120 |
.Sh EXIT STATUS |
121 |
.Bl -tag |
122 |
. |
123 |
.It Li EX_NOINPUT |
124 |
If |
125 |
.Fl d |
126 |
is given but the requested record does not exist, |
127 |
this status is returned. |
128 |
. |
129 |
.It Li EX_UNAVAILABLE |
130 |
The database cannot be accessed. |
131 |
. |
132 |
.It Li EX_USAGE |
133 |
Command line parameters are incorrect. |
134 |
. |
135 |
.El |
136 |
.Sh ADMINISTRATIVE PARAMETERS |
137 |
.Bl -tag |
138 |
. |
139 |
.It swarm.gdp.creation-service.user |
140 |
The name of the database user with permissions to update the |
141 |
human-oriented name to GDPname database. |
142 |
Defaults to |
143 |
.Li gdp_creation_service . |
144 |
. |
145 |
.It swarm.gdp.creation-service.passwd-file |
146 |
The name of the default password file. |
147 |
This can be overridden using the |
148 |
.Fl P |
149 |
flag. |
150 |
Defaults to |
151 |
.Pa /etc/gdp/creation_service_pw.txt . |
152 |
. |
153 |
.It swarm.gdp.hongd.admin.user |
154 |
The name of the database user with permissions to administer the |
155 |
human-oriented to GDPname database; |
156 |
used when |
157 |
.Fl d |
158 |
is active. |
159 |
Defaults to |
160 |
.Li hongd_admin . |
161 |
. |
162 |
.It swarm.gdp.hongd.admin.passwd-file |
163 |
The name of the file containing the default administrative password. |
164 |
Defaults to |
165 |
.Pa /etc/gdp/hongd_admin_pw.txt . |
166 |
. |
167 |
.El |
168 |
.Pp |
169 |
See |
170 |
.Xr gdp 7 |
171 |
for documentation for |
172 |
.Va swarm.gdp.hongdb.host , |
173 |
.Va swarm.gdp.hongdb.database , |
174 |
and |
175 |
.Va swarm.gdp.hongdb.table . |
176 |
.\".Sh ENVIRONMENT |
177 |
.\".Sh FILES |
178 |
.Sh SEE ALSO |
179 |
.Xr gdp 7 |
180 |
.\".Sh EXAMPLES |
181 |
.Sh BUGS |
182 |
Should have some easy but reasonably secure way of reading the password |
183 |
for the update user without resorting to the keyboard. |