system-config-users reports UnicodeDecodeError: 'utf8' codec can't decode bytes in position X-Y: invalid data
Issue
- system-config-users crashes with a
UnicodeDecodeError
if there are non-Unicode symbols in/etc/passwd
(or the related files/etc/group
,/etc/shadow
, or/etc/gshadow
)
# /usr/bin/system-config-users
Traceback (most recent call last):
File "/usr/share/system-config-users/system-config-users.py", line 45, in ?
mainWindow.mainWindow()
File "/usr/share/system-config-users/mainWindow.py", line 266, in __init__
self.refresh()
File "/usr/share/system-config-users/mainWindow.py", line 427, in refresh
self.populate_lists()
File "/usr/share/system-config-users/mainWindow.py", line 518, in populate_lists
self.populate_user_list()
File "/usr/share/system-config-users/mainWindow.py", line 458, in populate_user_list
gecos = unicode (gecos, 'utf-8')
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 11-13: invalid data
Environment
- Red Hat Enterprise Linux 5
- system-config-users-1.2.51-7.el5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.