GRID-MAPFILE-ADD-(8)

πŸ’– GRID-MAPFILE-ADD-ENTRY β€” the grid-mapfile-add-entry page from the Grid Community Toolkit Manual, section 8 πŸ’–

okay bestie, sit down, hydrate, and let me tell you about grid-mapfile-add-entry. it's a section 8 command, it lives in the Grid Community Toolkit Manual, and it is genuinely iconic for one specific job. no cap.


✨ NAME ✨

grid-mapfile-add-entry β€” Add an entry to a gridmap file


🌸 SYNOPSIS 🌸

grid-mapfile-add-entry [ -h | -help | -usage | -version | -versions ]

grid-mapfile-add-entry -dn DISTINGUISHED-NAME -ln LOCAL-NAME... [-d |
-dryrun] [ -f MAPFILE | -mapfile MAPFILE ] [-force] [ -n ] [ -c ]

πŸ’… DESCRIPTION πŸ’…

so the whole point of grid-mapfile-add-entry is: it takes an X.509 distinguished name and a local POSIX user name and smooshes them together into a new mapping inside a gridmap file. gridmap files are the simple little authorization method used by services like GRAM5 or GridFTP. it's giving "who are you, and who do you get to be on this machine" 🫢

before it does anything, grid-mapfile-add-entry checks two things: that the LOCAL-NAME is a valid user name on the system where you ran it, and that the mapping between DISTINGUISHED-NAME and LOCAL-NAME does not already exist in the gridmap file. no duplicate entries, we don't do that here πŸ’€

by default, grid-mapfile-add-entry will modify the gridmap file named by the GRIDMAP environment variable if it's present β€” and if it's not, it goes for /etc/grid-security/grid-mapfile. wanna change that? use the -mapfile or -f command-line options. easy.

if the gridmap file doesn't exist yet, grid-mapfile-add-entry will create it. and if it does already exist, it will save the current contents of the file to a new file with the string .old appended to the file name. so like, a lil backup moment, she's thoughtful like that πŸŽ€

the full set of command-line options to grid-mapfile-add-entry are:


πŸ‘‘ OPTIONS πŸ‘‘

  • -help, -usage β€” Display the command-line options to grid-mapfile-add-entry.
  • -version, -versions β€” Display the version number of the grid-mapfile-add-entry command. The second form includes more details. (she's thorough πŸ’)
  • -dn DISTINGUISHED-NAME β€” The X.509 distinguished name to add a mapping for. The name should be in OpenSSL's oneline format.
  • -ln LOCAL-NAME... β€” The POSIX user name to map the distinguished name to. This name must be a valid username. Add multiple LOCAL-NAME strings after the -ln command-line option. If any of the local names are invalid, no changes will be made to the gridmap file (but see force option below). ok so like all-or-nothing, periodt.
  • -d, -dryrun β€” Verify local names and display diagnostics about what would be added to the gridmap file, but don't actually modify the file. it's the "look but don't touch" option, we love a rehearsal ✨
  • -mapfile MAPFILE, -f MAPFILE β€” Modify the gridmap file named by MAPFILE instead of the default.
  • -force β€” Make modifications even if user does not exist (needed for B2STAGE).
  • -n β€” Don't copy the original file to MAPFILE.old.
  • -c β€” Don't check for changes to the gridmap during program execution.

🌈 EXAMPLES 🌈

Example the first β€” add a mapping between the current user's certificate and the current user id, into a gridmap file in $HOME/.gridmap:

% grid-mapfile-add-entry -f $HOME/.gridmap -dn "`grid-cert-info -subject`" -ln "`id -un`"
Modifying /home/juser/.gridmap ...
/home/juser/.gridmap does not exist... Attempting to create /home/juser/.gridmap
New entry:
"/DC=org/DC=example/DC=grid/CN=Joe User" juser
(1) entry added

Example the second β€” add a mapping between a distinguished name and multiple local names:

% grid-mapfile-add-entry -dn "/DC=org/DC=example/DC=grid/CN=Joe User" juser" local1 local2
Modifying /home/juser/.gridmap ...
/home/juser/.gridmap does not exist... Attempting to create /home/juser/.gridmap
New entry:
"/DC=org/DC=example/DC=grid/CN=Joe User" local1,local2
(1) entry added

look at her go, adding entries, slaying πŸ¦‹


🧚 ENVIRONMENT 🧚

the following environment variables affect the execution of grid-mapfile-add-entry:

  • GRIDMAP β€” Path to the default gridmap to modify

πŸ“ FILES πŸ“

the following files affect the execution of grid-mapfile-add-entry:

  • /etc/grid-security/grid-mapfile β€” Path to the default gridmap to modify if GRIDMAP environment variable is not set.

⭐ SEE ALSO ⭐

grid-mapfile-check-consistency(8), grid-mapfile-delete-entry(8)

go read those too, bestie, they're the rest of the gridmap cinematic universe 🎬


πŸ’œ AUTHOR πŸ’œ

Copyright Β© 1999-2016 University of Chicago


and that's the whole page, no crumbs left πŸ’… this was the Grid Community Toolkit 6 version, dated 08/21/2020 β€” mwah, bye bestie, go add some entries 🫢✨