1

我正在运行 dscl 。-list / 终端中的用户。我看到一些用户的名字前有一个 _ 例如 _mysql

这“似乎”阻止我设置 mysql 用户。当我尝试将 mysql 用户设置为 root 或我拥有的任何其他用户帐户时,我收到一条消息,指出 mysql 用户已经存在。当我运行 _mysql 用户以外的 dscl 命令时,我没有名为“mysql”的标准或管理员用户。

请问mysql前面的_是什么意思?

4

1 回答 1

1

Note the RecordName entry for that account:

$ dscl . -read /Users/_mysql
AppleMetaNodeLocation: /Local/Default
GeneratedUID: FFFFEEEE-DDDD-CCCC-BBBB-AAAA0000004A
NFSHomeDirectory: /var/empty
Password: *
PrimaryGroupID: 74
RealName:
 MySQL Server
RecordName: _mysql mysql
RecordType: dsRecTypeStandard:Users
UniqueID: 74
UserShell: /usr/bin/false

This account's primary name is _mysql, but it has mysql as an alias.

Solution: don't create a mysql account, use the one that's already there.

于 2013-09-16T18:32:30.337 回答