.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "PT_UTIL 8" .TH PT_UTIL 8 "2021-01-27" "OpenAFS" "AFS Command Reference" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" pt_util \- Load or dump a Protection Server database .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBpt_util\fR [\fB\-w\fR] [\fB\-user\fR] [\fB\-group\fR] [\fB\-members\fR] [\fB\-name\fR] [\fB\-system\fR] [\fB\-xtra\fR] [\fB\-prdb\fR\ <\fIprdb\ file\fR>] [\fB\-datafile\fR\ <\fIdata\ file\fR>] [\fB\-help\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \fBpt_util\fR command can be used to load or dump the protection database. It should only be used when \fBptserver\fR is not running. .PP The most likely reason to use it is to initialize the protection database when bringing up a new cell. The current syntax for this, presented below, needs improvement. \fBpt_util\fR can also be used when problems are suspected with the database. It can be used to dump the database or portions thereof, in several different ways, and to reload it. .PP The textual representation of the database has the following form: For users, .PP .Vb 1 \& name flags/quota viceid ownerid creatorid .Ve .PP For groups, .PP .Vb 2 \& name flags/quota viceid ownerid creatorid \& a\-username a\-user\-viceid .Ve .PP The second line is repeated for each member of the group. When reading the database, membership is not reported unless \fB\-members\fR is also included. .SH "OPTIONS" .IX Header "OPTIONS" If you don't specify any options, the only thing you'll learn is the ubik database epoch and version. .IP "\fB\-w\fR" 4 .IX Item "-w" Write to the protection database instead of reading. Only the file arguments make sense in combination with this argument. .IP "\fB\-user\fR" 4 .IX Item "-user" When reading, display users. .IP "\fB\-group\fR" 4 .IX Item "-group" When reading, display groups (but not necessarily members). .IP "\fB\-members\fR" 4 .IX Item "-members" When reading, display groups and also group members. .IP "\fB\-name\fR" 4 .IX Item "-name" When reading, follow name hashes, instead of id hashes. This may print different information if the database was corrupted. Otherwise, it should print exactly the same information, except in a different order. .IP "\fB\-system\fR" 4 .IX Item "-system" When reading, display system data, or more precisely, do not display entries with a viced <= \-32768 or >= +97537. .IP "\fB\-xtra\fR" 4 .IX Item "-xtra" When reading, display extra users and groups, or more precisely, do not display entries that are in the range \-32767...+97536 inclusive. .IP "\fB\-prdb\fR <\fIprdb file\fR>" 4 .IX Item "-prdb " Specifies the complete pathname of the file in which the Protection Database resides. Provide the complete name, including the ending \&\fI.DB0\fR. .IP "\fB\-datafile\fR <\fIdata file\fR>" 4 .IX Item "-datafile " Specify the file to which to dump (or \fB\-w\fR from which to read) textual database records. .IP "\fB\-help\fR" 4 .IX Item "-help" Prints the online help for this command. All other valid options are ignored. .SH "CAUTIONS" .IX Header "CAUTIONS" Entry timestamps and other information is not preserved when dumping the protection database. .SH "EXAMPLES" .IX Header "EXAMPLES" The following example shows how to initialize the database from scratch. .PP Before you do this, make sure \fBptserver\fR is not running. If you have multiple database servers, make sure \fIprdb.*\fR does not exist on any server machine. .PP Now, type this in \s-1EXACTLY,\s0 including the leading space on the line indicated. But do use Control-D at the end, not up-arrow D. .PP .Vb 5 \& pt_util \-w \& admin 128/20 1 \-204 \-204 \& system:administrators 130/20 \-204 \-204 \-204 \& admin 1 \& ^D .Ve .PP You will see this: .PP .Vb 10 \& # pt_util \-w \& pt_util: /var/lib/openafs/db/prdb.DB0: Bad UBIK_MAGIC. Is 0 should be 354545 \& Ubik Version is: 2.0 \& admin 128/20 1 \-204 \-204 \& system:administrators 130/20 \-204 \-204 \-204 \& Error while creating system:administrators: Entry for id already exists \& admin 1 \& pt_util: Ubik Version number changed during execution. \& Old Version = 2.0, new version = 33554432.0 \& # .Ve .PP To make a complete copy of the database, .PP .Vb 1 \& # pt_util \-user \-members \-datafile /tmp/out .Ve .PP To load from the complete copy, .PP .Vb 1 \& # pt_util \-w \-datafile /tmp/out .Ve .PP Don't do this until you read cautions, above. .SH "PRIVILEGE REQUIRED" .IX Header "PRIVILEGE REQUIRED" The issuer must be logged in as the superuser \f(CW\*(C`root\*(C'\fR on a database server machine to use \fBpt_util\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBprdb.DB0\fR\|(5), \&\fBptserver\fR\|(8) .SH "COPYRIGHT" .IX Header "COPYRIGHT" The following copyright covers this documentation: .PP Copyright (c) 2005 The Regents of the University of Michigan. \s-1ALL RIGHTS RESERVED.\s0 .PP Permission is granted to use, copy, create derivative works and redistribute this software and such derivative works for any purpose, so long as the name of the University of Michigan is not used in any advertising or publicity pertaining to the use or distribution of this software without specific, written prior authorization. If the above copyright notice or any other identification of the University of Michigan is included in any copy of any portion of this software, then the disclaimer below must also be included. .PP This software is provided as is, without representation from the University of Michigan as to its fitness for any purpose, and without warranty by the University of Michigan of any kind, either express or implied, including without limitation the implied warranties of merchantability and fitness for a particular purpose. The regents of the University of Michigan shall not be liable for any damages, including special, indirect, incidental, or consequential damages, with respect to any claim arising out of or in connection with the use of the software, even if it has been or is hereafter advised of the possibility of such damages.