# Initial User admin

**URL:** <https://forum.greenbone.net/t/initial-user-admin/9136>\
**Category:** Greenbone Community Edition\
**Created:** [May 6, 2021, 10:31am UTC](https://forum.greenbone.net/t/initial-user-admin/9136 "2021-05-06T10:31:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![grisutheguru](https://forum.greenbone.net/user_avatar/forum.greenbone.net/grisutheguru/32/2545_2.png) [@grisutheguru](https://forum.greenbone.net/u/grisutheguru)\
**Post date:** [May 6, 2021, 10:31am UTC](https://forum.greenbone.net/t/initial-user-admin/9136/1 "2021-05-06T10:31:11Z")

</div>

Environment: kali Linux

The gvm-setup script configures an initial user “admin” with a random password. This user can be used to log in via the web interface.  
I did so and created another user with the role Admin.  
After this the list of users does not show the user admin anymore.  
running gvmd --get-users, the user admin is not shown neither, the newly created user neither.  
the login with user admin is still possible, but it cannot be removed, disables nor can the password be changed.  
Do you know what went wrong?

---

<div class="post-metadata">

**Author:** ![bricks](https://forum.greenbone.net/user_avatar/forum.greenbone.net/bricks/32/46_2.png) [@bricks](https://forum.greenbone.net/u/bricks)\
**Post date:** [May 6, 2021, 11:07am UTC](https://forum.greenbone.net/t/initial-user-admin/9136/2 "2021-05-06T11:07:01Z")

</div>

You need to look at the gvmd.log file for errors. I suspect your database setup broke in some way.

---

<div class="post-metadata">

**Author:** ![filo](https://forum.greenbone.net/letter_avatar/filo/32/6_449c533f586939b6e5f246632a46421f.png) [@filo](https://forum.greenbone.net/u/filo)\
**Post date:** [May 6, 2021, 12:44pm UTC](https://forum.greenbone.net/t/initial-user-admin/9136/3 "2021-05-06T12:44:56Z")

</div>

> [@grisutheguru](#):
>
> cvmd --get-users, the user admin is not shown neither, the newly created user neither

Shouldn’t the commad be as follows?  
_sudo runuser -u \_gvm `--` gvmd --get-users --verbose_

---

<div class="post-metadata">

**Author:** ![grisutheguru](https://forum.greenbone.net/user_avatar/forum.greenbone.net/grisutheguru/32/2545_2.png) [@grisutheguru](https://forum.greenbone.net/u/grisutheguru)\
**Post date:** [May 6, 2021, 12:49pm UTC](https://forum.greenbone.net/t/initial-user-admin/9136/4 "2021-05-06T12:49:52Z")

</div>

Sorry changed the original post to  
gvmd instead of cvmd  
sorry that was a typo

---

<div class="post-metadata">

**Author:** ![grisutheguru](https://forum.greenbone.net/user_avatar/forum.greenbone.net/grisutheguru/32/2545_2.png) [@grisutheguru](https://forum.greenbone.net/u/grisutheguru)\
**Post date:** [May 6, 2021, 12:54pm UTC](https://forum.greenbone.net/t/initial-user-admin/9136/5 "2021-05-06T12:54:47Z")

</div>

sudo -u \_gvm gvmd --get-users

did the trick  
I was already on the way to this as the command run as root lead into a log entry:

gvmd: Main process is already running  
Greenbone Vulnerability Manager version 20.08.1 (DB revision 233)  
Getting users.  
sql\_open: PQconnectPoll failed  
sql\_open: PQerrorMessage (conn): FATAL: role “root” does not exist  
init\_manage\_process: sql\_open failed

Thought that the user account could be the problem.

Now as I was in the correct context, I see the correct list of two user, including the “admin” user of the original post.  
It is shown in the console, but not in the web interface, there it disappeared after introduction of the new user with the role “Admin”.  
“admin” is able to log in but not shown

---

<div class="post-metadata">

**Author:** ![filo](https://forum.greenbone.net/letter_avatar/filo/32/6_449c533f586939b6e5f246632a46421f.png) [@filo](https://forum.greenbone.net/u/filo)\
**Post date:** [May 6, 2021, 1:29pm UTC](https://forum.greenbone.net/t/initial-user-admin/9136/6 "2021-05-06T13:29:56Z")

</div>

I’m a bit confused on what could be missing now (you need to safely delete the old admin?), but you may want to give a look at this one, always executing with sudo -u \_gvm before

> **[How can I change username "admin"?](https://forum.greenbone.net/t/how-can-i-change-username-admin/4920/2)**
>
> You need to first create a new user with admin privileges: gvmd --create-user=yoyofamily --password=pwd --role=Admin Then inherit tasks from user admin: gvmd --inheritor=yoyofamily Then you can delete admin user: gvmd --delete-user=admin

**gvmd –delete-user=admin --inheritor=NEWUSER**

---

<div class="post-metadata">

**Author:** ![grisutheguru](https://forum.greenbone.net/user_avatar/forum.greenbone.net/grisutheguru/32/2545_2.png) [@grisutheguru](https://forum.greenbone.net/u/grisutheguru)\
**Post date:** [May 6, 2021, 1:49pm UTC](https://forum.greenbone.net/t/initial-user-admin/9136/7 "2021-05-06T13:49:57Z")

</div>

Thnx a lot for all the explanations.  
The original idea is to delete the default user as written in our policy.  
Plan B is to change the password from the initial one to a new one.  
I failed to do the changes in the web interface, that’s why I tried it on console, but failed again, as I was not aware of the user context. My fault, was obvious.  
But one inconsistancy still remains: Why does “admin” disappear from the user list after introducing a new user with the role “Admin” on the web interface?

---

<div class="post-metadata">

**Author:** ![bricks](https://forum.greenbone.net/user_avatar/forum.greenbone.net/bricks/32/46_2.png) [@bricks](https://forum.greenbone.net/u/bricks)\
**Post date:** [May 6, 2021, 1:59pm UTC](https://forum.greenbone.net/t/initial-user-admin/9136/8 "2021-05-06T13:59:33Z")

</div>

> [@grisutheguru](#):
>
> But one inconsistancy still remains: Why does “admin” disappear from the user list after introducing a new user with the role “Admin” on the web interface?

It should still be visible via `sudo -u _gvm gvmd --get-users`. But at the web interface only the creating admin user can see the new admin user. Not the other way around.

---

<div class="post-metadata">

**Author:** ![system](https://forum.greenbone.net/uploads/default/original/2X/4/4660e797edfaea797a8c9965246072ea26732804.png) [@system](https://forum.greenbone.net/u/system)\
**Post date:** [April 7, 2025, 10:10am UTC](https://forum.greenbone.net/t/initial-user-admin/9136/9 "2025-04-07T10:10:54Z")

</div>

Closed on April 7, 2025, 10:10am UTC


