Portál AbcLinuxu, 6. listopadu 2025 09:48
prosim o radu. Zhruba jeden mesic mam problem s instalaci a aktualizaci z repozitare. Problem je v tech instalacich, ktere vytvareji noveho uzivatele. Jedna se o debian 7.
root@test:~# aptitude upgrade
The following partially installed packages will be configured:
dbus dbus-x11
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up dbus (1.6.8-1+deb7u6) ...
adduser: Please enter a username matching the regular expression configured
via the NAME_REGEX configuration variable. Use the `--force-badname'
option to relax this check or reconfigure NAME_REGEX.
dpkg: error processing dbus (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of dbus-x11:
dbus-x11 depends on dbus; however:
Package dbus is not configured yet.
dpkg: error processing dbus-x11 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
dbus
dbus-x11
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up dbus (1.6.8-1+deb7u6) ...
adduser: Please enter a username matching the regular expression configured
via the NAME_REGEX configuration variable. Use the `--force-badname'
option to relax this check or reconfigure NAME_REGEX.
dpkg: error processing dbus (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of dbus-x11:
dbus-x11 depends on dbus; however:
Package dbus is not configured yet.
dpkg: error processing dbus-x11 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
dbus
dbus-x11
root@test:~# printenv | grep NAME_REGEX
NAME_REGEX=^[a-z][-a-z0-9]*$
Kdyz chci pridat uzivatele, napriklad franta.druhy, tak je --force-badname ok, ale do aptitude to nezadam. Co a jak mam nastavit, aby me aptitude bral vazne? Zjistil jsem, ze pri standartni (nove) instalaci promenna NAME_REGEX neexistuje a pritom vsechno funguje spravne.
Myslim, ze problem mohl zacit v dobe, kdy jsem pridaval uzivatele s teckou (franta.druhy). Parametr --force-badname je neco, co jsem se tehdy obaval pouzit, a tak jsem si hral s promennou NAME_REGEX. Stejne jsem nakonec --force-badname musel pouzit.
Google moc nepomohl, vsude pisou, ze mam nastavit NAME_REGEX. Ale uz ne jak.
Nastavuju to pres export: root@test:~# export NAME_REGEX="^[a-z][-a-z0-9]*$"
Myslim, ze takhle nastaveny NAME_REGEX by mel pro aptitude bohate stacit.
Co delam blbe?
NAME_REGEX neni promenna prostredi ale nastavuje se v /etc/adduser.conf
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.