How to make users with UID under 1000 appear in LightDM?

I've been trying to set this up, but I can't find a solution. It's neccessary, because the machine Ubuntu is on is a Macbook and needs to have access to the files of the Mac user. Is there any way to get this to work?


Solution 1:

Lightdm has the config file /etc/lightdm/users.conf which you can edit to set a minimum UID. The default is 500. It also sets hidden users and certain shells that if a user has are hidden. Try editing that file and restarting lightdm.

[UserAccounts]
minimum-uid=500
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/sbin/nologin

Solution 2:

You will probably also want to change the defaults for adduser & useradd, to create new users with UID starting at 500.

Two files need change, as:

/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