Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

up vote 3 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.)

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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