5

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!

Shane Madden
  • 112,982
  • 12
  • 174
  • 248
danakim
  • 410
  • 2
  • 8

1 Answers1

3

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.)

Marius Gedminas
  • 454
  • 3
  • 9
  • 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 03 '10 at 13:16