Ampersand (&) in real name/full name replaced by login

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
TimmermanV

Ampersand (&) in real name/full name replaced by login

Post by TimmermanV »

Does/should Linux Mint adhere to the "FreeBSD File Formats Manual" when it comes to the passwd file?

If you choose to install Linux Mint using a name that includes an ampersand, you'll be surprised at the results. (at least, I was) In many cases where the user's name is being displayed, the ampersand is replaced by a capitalized version of the user's login name.

In Xfce, Whisker Menu does this. In MATE, both the locked screen dialog and the Configuration Center's "About me" does this. However, "Users and Groups" does not replace the ampersand.

I found that this behavior is due to glib's g_get_real_name which implements the following passage from man passwd in "FreeBSD File Formats Manual". http://www.manpages.info/freebsd/passwd.5.html

(...)
If an ampersand (`&') character appears
within the fullname field, programs that use this field will substitute
it with a capitalized version of the account's login name.
(...)

I found this to be confusing as a new user and would suggest warning the user about the use of '&' (or even disallowing its use). At least make it consistent throughout Linux Mint.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
TimmermanV

Re: Ampersand (&) in real name/full name replaced by login

Post by TimmermanV »

I guess this forum was the wrong place to post about this issue. That, or no one cares. :P
User avatar
Pilosopong Tasyo
Level 6
Level 6
Posts: 1432
Joined: Mon Jun 22, 2009 3:26 am
Location: Philippines

Re: Ampersand (&) in real name/full name replaced by login

Post by Pilosopong Tasyo »

TimmermanV wrote:That, or no one cares.
It may have never occurred to you that perhaps it's just a simple case of no one [technical enough] has a definitive answer to your question. Just because you didn't get an answer doesn't mean people don't care. :wink:

Yes, you may be using Linux Mint, but bear in mind that your question (the ampersand in the username vis-a-vis the passwd file) is broad enough that it's possible that it applies to other distros, not just Mint. It is common knowledge that the main edition uses Ubuntu as its base so apart from asking here, you might want to ask in the Ubuntu forum as well.
o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].
TimmermanV

Re: Ampersand (&) in real name/full name replaced by login

Post by TimmermanV »

Pilosopong Tasyo wrote:It may have never occurred to you that perhaps it's just a simple case of no one [technical enough] has a definitive answer to your question. Just because you didn't get an answer doesn't mean people don't care. :wink:
I know, I know. :P That's actually what I meant by this forum not being the right place to post about the issue (- no one here knows how to answer this question). I didn't mean to sound rude.

I tried bringing the issue to the attention of MATE devs, but my bug report got closed quickly.
https://github.com/mate-desktop/mate-co ... issues/109
The issue seems to be originating from within glib. However, it's not a bug. Glib is working exactly as intended. (see link for details)

In the end, the result is quite unhelpful to the end-user (imho). It leaves me puzzled as to where I can go with this issue.
I'll try an Ubuntu forum later as you suggested.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Ampersand (&) in real name/full name replaced by login

Post by Flemur »

It leaves me puzzled as to where I can go with this issue.

Make a new account without special characters in the username; then copy the settings from the old account and delete it.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
TimmermanV

Re: Ampersand (&) in real name/full name replaced by login

Post by TimmermanV »

Thanks. That's not what I meant by that.
Locked

Return to “Other topics”