Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 905264

Summary: =net-analyzer/gvmd-21.4.5-r5 Can't create GVM user, throws an error "Failed to create user: Invalid characters in user name"
Product: Gentoo Linux Reporter: Giuseppe Foti <foti.giuseppe>
Component: Current packagesAssignee: jonas.licht
Status: UNCONFIRMED ---    
Severity: normal CC: flow, foti.giuseppe, proxy-maint
Priority: Normal Keywords: EBUILD, PATCH, PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://forum.greenbone.net/t/kali-cant-create-gvm-user-throws-an-error-failed-to-create-user-invalid-characters-in-user-name/13062/49
See Also: https://github.com/gentoo/gentoo/pull/31106
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: The patch file and the proposed -r6 ebuild
fixed patch to honor a second commit in github

Description Giuseppe Foti 2023-04-29 00:46:21 UTC
Created attachment 860897 [details, diff]
The patch file and the proposed -r6 ebuild

Hi, I'm trying to setup Greenbone Vulnerability Management on gentoo following this guide: https://wiki.gentoo.org/wiki/Greenbone_Vulnerability_Management

When I try to create a new gvmd user with Admin role:
---
root #sudo -u gvm bash
user $gvmd --create-user=admin --role=Admin
---
I obtain:
---
Failed to create user: Invalid characters in user name
---

It seems GLib have switched from PCRE to PCRE2 and that the previously PCRE compatible regex used in gvmd for the user name validation functionality is not compatible with the PCRE2 functionality.

More info can be found here:
https://forum.greenbone.net/t/kali-cant-create-gvm-user-throws-an-error-failed-to-create-user-invalid-characters-in-user-name/13062/49

and here:
https://gitlab.gnome.org/GNOME/glib/-/issues/2760
https://bugs.kali.org/view.php?id=7926#c16764

I tested the attached patch and it seems to work.
Comment 1 Giuseppe Foti 2023-05-01 09:50:09 UTC
Created attachment 861000 [details, diff]
fixed patch to honor a second commit in github

Please don't use the previous patch