In order to use NetDRMS, you must have permission to access the DRMS database and the SUMS data storage and logging area. The following instructions are intended for the database and/or system administrator to set you up as an authenticated user. They assume that there is a running NetDRMS server for your site, and that there are publicly accessible NetDRMS utility executables and libraries against which you can link for development of code based on the DRMS API. If you wish to install your private version of the NetDRMS distribution, please refer to the Installation/Upgrade instructions.
The user setup described here only needs to be performed once per user, even if you build and upgrade your own distribution. The build does not depend on it, but you will need it to be able to execute code modules that access the DRMS.
% psql -h dbserver -d dbname -U postgres_admin postgres=> create user name; postgres=> alter user name with password 'init_pass'; postgres=> \q
% masterlists dbuser=name namespace=ns nsgrp=userYou will be prompted for the postgres administrator password. The nsgrp=user argument specifies that this namespace will be a private one, in which series can be created, modified, and deleted by the named user only. In order to set up a shared namespace, you need to create a separate Postgres role, run the masterlists command with that role given for the dbuser, and with the argument nsgrp=sys. An example is provided in the setup instructions for the "public" namespace drms available to users sharing the role drmsuser. Step 7 below shows how to give a user write access to such a shared namespace, by making them a member of the role associated with that namespace by the masterlists command.
% psql -h dbserver -d dbname -U postgres_admin postgres=> insert into admin.sessionns values ( 'name' , 'ns' ); postgres=> \q
% psql -h dbserver -d dbname -U user postgres=> alter user name with password 'new_pass'; postgres=> \qThe user will be prompted by the psql process for their original password.
% cat > ~/.pgpass dbserver:*:*:user:password dbserver.site.dom:*:*:user:password ^D % chmod 600 ~/.pgpass
% psql -h dbserver -d dbname -U postgres_admin postgres=> grant drmsrole to user; postgres=> \qwhere drmsrole is the name of the owner of the target namespace
|23 Oct 2009, 16:43-0700|