I went through the PoststreSQL setup yesterday and I verified my user admin has access to the role dba (see below):
postgres@osboxes:/home/mysuser/projects/gvmd$ psql gvmd
psql (9.6.15)
Type “help” for help.
gvmd=# create role dba with superuser noinherit;
ERROR: role “dba” already exists
gvmd=# grant dba to admin;
NOTICE: role “admin” is already a member of role “dba”
GRANT ROLE
gvmd=# create extension “uuid-ossp”;
ERROR: extension “uuid-ossp” already exists
However, in the meantime a colleague of mine noticed I was using a regular user, instead of the Linux superuser.
Now everything works as expected. I can spawn gvmd and create/modify/delete objects like users, tasks, etc.
i have the same problem like him… and i dont want to use root user, but i also followed the points from the install docs… Maybe know whats the problem? I use the new gvmd 9.0
Use a regular user for installation (do not use root).
Once you have all the cloned repos locally, read the INSTALL.md files and follow the steps.
If you do not know how to set up libraries/folder variables (DCMAKE_INSTALL_PREFIX, etc) before cmake/compilation, just use the suggested commands from the build folder.
$ cmake ..
$ make
$ make install
When running cmake, make or make install you will get some message stoppers, particularly if you have not set up the libraries/folder variables before running cmake/compilation. Some of them will look like can’t copy this file into there (during make install) or maybe missing packages. This is not blocking. Just give folder permissions and relaunch the command.
thanks for the fast answer, i will try it and give you than a feedback if its worked for me
The problem is that i try to install the gvm11 over the gvm10 which was already running… I dont know if thats a good idea… but ye… i will see…
@victor.sanchez
i installed it now again step by step till to the step with the postgresql… but i wonder why i have to edit now sth in the postgresql settings… with gvm 10 i just installed it and doesnt make anything with postgres…
atm i have this error in the gvmd.log:
md main:MESSAGE:2019-10-15 12h38.09 utc:30120: Greenbone Vulnerability Manager version 9.0.0 (DB revision 221)
md manage:WARNING:2019-10-15 12h38.09 utc:30121: sql_open: PQconnectPoll failed
md manage:WARNING:2019-10-15 12h38.09 utc:30121: sql_open: PQerrorMessage (conn): FATAL: role “user” does not exist
md manage:WARNING:2019-10-15 12h38.09 utc:30121: init_manage_process: sql_open failed
i try now the postgresql steps from the install.md.
Do you maybe know if i have to name the user like my “login” user?
i dont know if it can be come to complications cause my login username is “user”?
I used this command for cmake:
cmake -DCMAKE_INSTALL_PREFIX=/home/user/install …
for the libraries variables i have used in gvm10 this:
LD_LIBRARY_PATH=:/home/user/install/lib/
PATH=/home/user/.local/bin:/home/user/install/bin:/home/user/install/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PKG_CONFIG_PATH=/home/user/install/lib/pkgconfig
so that you dont get wrong, i have a working GVM10 Setup, but because GVM11 is released i try to “update” it with install the new version GVM11 over the old setup. In the old Setup i dont had to create a postgres user/db… So i wonder why i have to do that now.
okay… i renamed now my username and installed greenbone for the new user… now the postgres setup works… but now its make again a new error… if i try to start gvmd i see this error in the log:
md main:MESSAGE:2019-10-16 06h10.22 utc:3965: Greenbone Vulnerability Manager version 9.0.0 (DB revision 221)
md manage:WARNING:2019-10-16 06h10.22 utc:3966: sql_exec_internal: PQexec failed: ERROR: could not load library “/home/gvm/install/lib/libgvm-pg-server.so”: libgvm_base.so.11: cannot open shared object file: No such file or directory
(7)
md manage:WARNING:2019-10-16 06h10.22 utc:3966: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS ‘/home/gvm/install/lib/libgvm-pg-server’, ‘sql_hosts_contains’ LANGUAGE C IMMUTABLE;
md manage:WARNING:2019-10-16 06h10.22 utc:3966: sqlv: sql_exec_internal failed
For me it seems you are not very familiar with unix groups/permissions, postgres setup and building C code from source. Therefore I would recommend to use packages from a distribution or alternatively our community edition.
The solution for your problem is listed in the INSTALL.md document of gvmd
If you don’t know what you are doing and adding library path to it, you really put your system at security risks. I would strongly advice you to use a sane system.
It’s not clearly stated in the docs but changing your ld.so.conf has serious security implications and should not be done on hosts used in production setups. It’s only intended for short term testing or development.
okay… at the moment i dont know how i should do the setup so that i dont have to put it in the ld.so.conf… Do you can tell me if the Community Edition have all features like the Source Code Edition?
There is only one correct way, build install packets and install them direct into your OS distribution. You need to build your own permission and security model around this as well.