我一直在尝试设置它,但找不到解决方案。这是必要的,因为 Ubuntu 所在的机器是 Macbook,需要访问 Mac 用户的文件。有什么办法可以让它工作吗?
答案1
Lightdm 有一个配置文件/etc/lightdm/users.conf
,您可以编辑它来设置最小 UID。默认值为 500。它还设置了隐藏用户和某些 shell(如果用户有的话)。尝试编辑该文件并重新启动 lightdm。
[UserAccounts]
minimum-uid=500
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/sbin/nologin
答案2
您可能还想更改 adduser 和 useradd 的默认值,以创建 UID 从 500 开始的新用户。
两个文件需要更改,如下:
/etc/login.defs
...
# Min/max values for automatic uid selection in useradd
#
UID_MIN 500
UID_MAX 60000
# System accounts
#SYS_UID_MIN 100
#SYS_UID_MAX 499
...
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 500
GID_MAX 60000
# System accounts
#SYS_GID_MIN 100
#SYS_GID_MAX 499
/etc/adduser.conf
...
# package, may assume that UIDs less than 100 are unallocated.
FIRST_SYSTEM_UID=100
LAST_SYSTEM_UID=499
FIRST_SYSTEM_GID=100
LAST_SYSTEM_GID=499
# FIRST_[GU]ID to LAST_[GU]ID inclusive is the range of UIDs of dynamically
# allocated user accounts/groups.
FIRST_UID=500
LAST_UID=29999
FIRST_GID=500
LAST_GID=29999