Author Topic: Adding a user  (Read 3232 times)

geophile

  • Newbie
  • *
  • Posts: 14
    • View Profile
Adding a user
« on: July 17, 2018, 03:10:31 pm »
I'm having some trouble adding a new user. I somehow added one user successfully, using the Users and Groups tool under Accessories. The new user's id is 100001 (1 greater than that of the gemini user), and this user shows up on the login screen.

Then I added a second user. This one has an id below 100000 and does not show up on the login screen.

I don't know what I did differently the two times. How do I add a user who can login?

Eric BF

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Adding a user
« Reply #1 on: July 17, 2018, 06:10:12 pm »
Quote from: geophile
I'm having some trouble adding a new user. I somehow added one user successfully, using the Users and Groups tool under Accessories. The new user's id is 100001 (1 greater than that of the gemini user), and this user shows up on the login screen.

Then I added a second user. This one has an id below 100000 and does not show up on the login screen.

I don't know what I did differently the two times. How do I add a user who can login?
Very strange.  I just tried creating a new account, having previously created one, and the new account was created with uid 100002, as expected.  Not sure what you might have done to get something different. Having said this, I added the new account using the adduser command from a shell window, not using the accesories tool.

Code: [Select]
sudo adduser NEWUSER
If you want to fix things manually, you can adjust the uid by using sudo vipw and then do a

Code: [Select]
sudo chown -R 100002 /home/NEWUSER

where NEWUSER is the login name of the new account.  The uid is the third entry (colon separated) in the passwd file. You might need to adjust the gid (group id) as well, using vigr and adding the gid to the chown command (see man page).
« Last Edit: July 17, 2018, 06:12:46 pm by Eric BF »
Gemini 4G Debian
OpenPandora with Debian

geophile

  • Newbie
  • *
  • Posts: 14
    • View Profile
Adding a user
« Reply #2 on: July 17, 2018, 11:50:01 pm »
The Users and Groups tool does seem broken.

I also tried "useradd" which didn't work right. I forget, it's "adduser", which worked fine.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Adding a user
« Reply #3 on: August 14, 2018, 08:04:35 am »
I added a new user, and used the same UID and GID that I use on all my machines, but it doesn't show up on the login screen.  I added all the same groups as the gemini user

Code: [Select]
$ id -a
uid=1000(paulm) gid=1000(paulm) groups=1000(paulm),27(sudo),29(audio),44(video),50(staff),1002(aid_system),1003(aid_graphics),1004(aid_input),1005(aid_audio),3001(aid_net_bt_admin),3002(aid_net_bt),3003(aid_inet),3004(aid_inet_raw),3005(aid_inet_admin),100000(gemini)

please can anyone tell me where the settings are to make users visible?

thanks

----

edit, I found it, it's /etc/sddm.conf

I backed it up as sddm.conf.orig, made a simple change, logged in as "gemini" and logged out and now my username appears

Code: [Select]
$ diff sddm.conf*
66,67c66
< #MaximumUid=200000
< MaximumUid=9999
---
> MaximumUid=200000
70,71c69
< #MinimumUid=100000
< MinimumUid=1000
---
> MinimumUid=100000
« Last Edit: August 14, 2018, 08:09:33 am by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Adam Boardman

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Adding a user
« Reply #4 on: August 14, 2018, 09:47:13 am »
The reason was to avoid clashing with ID's used by Android, if you use the 'adduser' command then its handled for you:
https://github.com/gemian/gemian-multistrap...tc/adduser.conf

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Adding a user
« Reply #5 on: August 14, 2018, 05:21:00 pm »
Quote from: Adam Boardman
The reason was to avoid clashing with ID's used by Android, if you use the 'adduser' command then its handled for you:
https://github.com/gemian/gemian-multistrap...tc/adduser.conf

ah, I see. thanks

given my device is encrypted, and part of the SD card storage made adoptable, the only thing I can access in Android is the FAT32 partition in the memory card, I don't think it will be an issue. If it does become one, it'll be fairly straight-forward to renumber the account in the debian partition.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Kero

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://https://https://chmeee.org/#GeminiPDA
Adding a user
« Reply #6 on: August 15, 2018, 05:55:24 am »
My SD card is formatted with ext4 has a user 1000 which is shared with other Linux machines.

It also has group 1000, which *is* taken by aic-something-somethng. and so far that has not caused any problems.