4

currently I'm using Ubuntu 16.04 and have set my User UID to 501 (interop with Mac).

However even after setting login.defs:

UID_MIN                   500
UID_MAX                 60000
# System accounts
#SYS_UID_MIN              100
SYS_UID_MAX               499

It wil still not work and neither display the user in lightdm nor in the Ubuntu User Settings, any ideas?

  • if this is for NFS there are options for uid mapping that will do this with much less bother , other protocols generally don't need UID equivalence as they use names instead of numbers. – Amias Aug 04 '16 at 13:15
  • if it is so you can actually give a way to do so if it works I will give you the bounty rep. – Christian Schmitt Aug 04 '16 at 13:26

3 Answers3

0

Not only the user but also the group can bet set, look into the following

 GID_MIN                  1000
 GID_MAX                 60000
# System accounts
SYS_GID_MIN               100
SYS_GID_MAX               499
s1mmel
  • 2,024
0

so once you have reset your userid and got lightdm back again.

the problem looks like you are using nfs3 instead of nfs4 , nfs4 should work happily with usernames instead of userids. This way you just need the names to match.

check that the exporting server is running nfs4 and exporting in nfs4 mode.

ubuntu should be nfs4 on the client end but may need to be told not to use 'sys' authentication (which is looking up UID's not names).

Amias
  • 5,246
  • actually I'm connecting a mac server on a ubuntu client. and the only other authentication mechanisms than SYS are krb-5 which is too akward to configure for what I'm doing. – Christian Schmitt Aug 04 '16 at 14:10
  • krb5 is a good way to do the uid mapping but yes its fiddly and probably overkill for two machines. You should be ok with SYS if you check your mac is running a new NFS and is set to export as NFS4 not NFS3. – Amias Aug 05 '16 at 09:31
0

Just tried changing /etc/login.defs:

#
# Min/max values for automatic uid selection in useradd
#
UID_MIN                   100
UID_MAX                 60000
# System accounts
#SYS_UID_MIN              100
#SYS_UID_MAX              999

#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN                   100
GID_MAX                 60000
# System accounts
#SYS_GID_MIN              100
#SYS_GID_MAX              999

After reboot, lightdm shows all users with uid > 100 && gid > 100, and they are shown in Ubuntu User Manager (I have no users with UID between 500 and 1000, so tried 100). I think S1mmel is right here.

Are you sure accountsservice is running?

ridgy
  • 2,356