Unix如何解释$?

杰西·威廉·麦克·道格(Jesse William Mac Dougall)
[orca@orcacomputers public_html]$ adduser Jé$$è+rèè
adduser: invalid user name 'Jé28956è+rèè'

在CentOS7中添加用户时,我无法使用$。凯伦说:“你为什么要这么做!?” 当她成为我的真实自我时,她在社会上将我钉在了十字架上,是左撇子尼安德特人。好奇心。

我是行业审计师,因此当我整理数据时,我会提高自己的幸福感。那么$在这里告诉Unix是什么呢?到目前为止,我能$$=28956在UNIX中找到。这是一个随机字符串吗?

有什么方法可以使用$字符对数据进行排序?或任何其他出于计算机科学目的而被认为具有生产力的用例?

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

真的是什么!这是我必须自己分发的地方吗?

Thegs

除了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实现中永远无效。

是的,如果您不喜欢它,您可以自由滚动。您可以在此处找到源代码

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章