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?
Asked
Active
Viewed 7,451 times
2 Answers
6
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

Jorge Castro
- 71,754

mfisch
- 3,643
-
1Thanks, this solves it! But must have been default is 1000, as I set the UID to 502 and the user disappered. – Nov 10 '12 at 18:37
-
I also have
minimum-uid=500
but in fact it's 1000. Where is it overridden? – user2513149 Feb 25 '17 at 18:21 -
OK, already found. In
/etc/login.defs
there is a lineUID_MIN 1000
– user2513149 Feb 25 '17 at 18:25
5
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

mark1softie
- 51
- 1
-
Why so? The newly created users are in no way guaranteed to match the new ones on the Mac, and either way it's a single-user laptop.
Thanks though, I'll remember this for future use, and perhaps it'll help some other people when they find this question and answers.
– Nov 11 '12 at 21:47 -
+1 Thanks! My /etc/lightdm/users.conf had minimum-uid=500 but still would not show users whose uid was less than 1000. – copper.hat Sep 29 '13 at 21:15
usermod -u UID username
– Achu Nov 02 '12 at 18:55chown
all the files of the Mac-User afterwards, so they belong to the new UserID. – Paul Hänsch Nov 02 '12 at 19:01