Unixは$をどのように解釈しますか? [閉鎖]

Unixは$をどのように解釈しますか? [閉鎖]
[orca@orcacomputers public_html]$ adduser Jé$$è+rèè
adduser: invalid user name 'Jé28956è+rèè'

CentOS7でユーザーを追加するときは$を使用できません。 Karenは私を左利きのネアンデルタール人であり、真の自我とみなして社会的に十字架に釘付けながら「いったいなぜそうしたのですか?」と尋ねました。好奇心。

職業上の感謝人だから資料を整理すると幸せ感が加わります。それでは、ここで$はUnixに何を伝えますか?これまで私ができることは$$=28956UNIX環境でやるだけです。これはランダムな文字列ですか?

$文字を使用してデータを並べ替える方法はありますか?それとも、コンピュータサイエンスの目的に有効であると考えられる他のユースケースはありますか?

[orca@orcacomputers public_html]$ adduser Jéssè+rèè
adduser: invalid user name 'Jéssè+rèè'

本当に何! ?私が直接配布する必要がある場所ですか?

ベストアンサー1

特殊文字をエスケープする方法に対するBlueManCZの回答に加えて、提案されたユーザー名に誤った文字がたくさん含まれています。 CAVEATS セクションの下の CentOS 7 adduser のマニュアルページを参照してください。

CAVEATS
       You may not add a user to a NIS or LDAP group. This must be performed on the corresponding
       server.

       Similarly, if the username already exists in an external user database such as NIS or LDAP,
       useradd will deny the user account creation request.

       Usernames may contain only lower and upper case letters, digits, underscores, or dashes. They
       can end with a dollar sign. Dashes are not allowed at the beginning of the username. Fully
       numeric usernames and usernames . or .. are also disallowed. It is not recommended to use
       usernames beginning with . character as their home directories will be hidden in the ls
       output. In regular expression terms: [a-zA-Z0-9_.][a-zA-Z0-9_.-]*[$]?

マニュアルページのオンラインコピーを見つけることができますここ。したがって、$ユーザー名には有効な文字ですが、最後にのみ有効です。さらに、+アクセント文字はèCentOSのadduser実装では決して機能しません。

はい、気に入らない場合は自由に自分で始めることができます。ソースコードを見つけることができますここ

おすすめ記事