Re: CASE CLOSED... Re: "peer" authentication: cannot make "pg_ident.conf" work as I believe that the doc says that it should - Mailing list pgsql-general

From Bryn Llewellyn
Subject Re: CASE CLOSED... Re: "peer" authentication: cannot make "pg_ident.conf" work as I believe that the doc says that it should
Date
Msg-id 17ED59DC-B9F5-419F-AAB5-64FC1D31B4C9@yugabyte.com
Whole thread Raw
In response to Re: CASE CLOSED... Re: "peer" authentication: cannot make "pg_ident.conf" work as I believe that the doc says that it should  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Responses Re: CASE CLOSED... Re: "peer" authentication: cannot make "pg_ident.conf" work as I believe that the doc says that it should  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
hjp-pgsql@hjp.at wrote:

bryn@yugabyte.com wrote:

However, Linux (at least) simply disallows O/S users that have a dollar sign in the name.

This is getting quite off-topic, but that isn't true:

trintignant:~ 22:46 :-) 1015# useradd -m -s /bin/bash 'mac$crooge'
trintignant:~ 22:46 :-) 1016# su - 'mac$crooge'
mac@trintignant:~$ id
uid=1002(mac$crooge) gid=1003(mac$crooge) groups=1003(mac$crooge)
mac@trintignant:~$

I'm not saying that doing this is a good idea ...

This is what I see. I have Ubuntu 20.04 LTS VM using Parallels Desktop Version 18.

# adduser 'dog$house'
adduser: To avoid problems, the username should consist only of
letters, digits, underscores, periods, at signs and dashes, and not start with
a dash (as defined by IEEE Std 1003.1-2001). For compatibility with Samba
machine accounts $ is also supported at the end of the username

I tried your longer version verbatim:

useradd -m -s /bin/bash 'mac$crooge'

and that quietly succeeded. I'd left out "-m" and "-s" because, for an ordinary username, I get the home directory that I want and the (bash) shell that I want without explicitly asking for these.

It's bizarre that, merely by being explicit about these two fact, I'm now allowed to have a name with a dollar-sign—notwithstanding what the text of the earlier error message claimed. I wondered if that it wasn't an error message at all—and was just a warning. But "cat /etc/passwd" showed me that "dog$house" had not been created while "mac$crooge" HAD been.

So I've leaned something about yet another Linux weirdness.

However, now that I know what I know from what contributors to this thread have told me, I'll stick with plain "clstr_mgr" for the O/S user and use the "clstr$mgr" spelling just for the cluster role. It's a mild nuisance having to enquote this when it's the argument of psql's "-U" option, and in the config files. But I can live with that.

pgsql-general by date:

Previous
From: 黄宁
Date:
Subject: Delete a table automatic?
Next
From: Ron
Date:
Subject: Re: Autovacuum on Partitioned Tables