I was recently asked to modify the GECOS field in the passwd file for a certain user so that it will contain his name with his original accented characters. My first was reaction was "sure, why not?" but then I started getting paranoid that there will surely be a *nix utility that will fail to parse the passwd file because of UTF-8 characters.

So my question is, have you ever ran into any problems using UTF-8 in the passwd file? Or do you know of any?

My locale is set to UTF-8 on all boxes. ( $LANG=en_US.UTF-8 )

Thanks!

link|improve this question
feedback

1 Answer

up vote 2 down vote accepted

The GECOS field is in /etc/passwd, not /etc/shadown.

I've been using UTF-8 realnames there with no adverse effects for years.

(The adduser utility on Debian used to let me specify UTF-8 usernames a long time ago, but later started rejecting them. I sometimes wonder why.)

link|improve this answer
Thans Marius for the answer! And yes, a bit of confusion on my side with the 2 files :) I modified the question. I think I will at least try it and see if any of the tools we use / run will fail. – danakim Nov 3 '10 at 13:16
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.