LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Low priority liveslak feature request (https://www.linuxquestions.org/questions/slackware-14/low-priority-liveslak-feature-request-4175671974/)

FlinchX 03-25-2020 07:15 PM

Low priority liveslak feature request
 
I am using Slackware Live Edition to experiment with a script that automates the creation of custom user accounts and I have a problem.

During the creation of a regular Slackware user account, the first available UID is picked. For the very first regular user in the system, that is usually 1000. My regular "main" user (I use a few for different purposes) has uid=1000 as well.

The problem is that the "live" user in Slackware Live Edition has uid 1000 as well, so they conflict.

Currently my workaround is to boot the livecd image in VirtualBox, log in as root (system-level admin tasks like creating users require superuser privileges anyway), then just remove the live user with userdel. This seems to work - the record for the live user disappears from /etc/passwd

I thought it would be nice if in addition to the user name "live" I could explicitly set the user id for it as well in make_slackware_live.conf or via an environment variable when building the ISO image.

I don't know if this qualifies as justified feature request and the variable name choice that is LIVEUID seems a bit unfortunate from this perspective. To me, something like

Code:

LIVENAME="live" # (or LIVEUSER, anything to free the LIVEUID name for the actual uid)
LIVEUID=1000

would look better, but this breaks backwards compatibility and I don't know how severe the implications would be.

Alien Bob 03-26-2020 01:59 AM

You confuse UID with UIDNumber. The use of "UID" in liveslak is correct.
Also, this place (LQ) is not a place to make feature requests, I discuss the scripts and the ISOS on my own blog.
Perhaps you can adapt your own script to make sure that '1000' is not getting used by it? You'll find many systems in the wild that have the regular user with UidNumber 1000.

FlinchX 03-26-2020 03:16 AM

Quote:

Originally Posted by Alien Bob (Post 6104442)
You confuse UID with UIDNumber.

Perhaps I was confused by the fact that the manpage of useradd names the number "UID".

Quote:

Originally Posted by Alien Bob (Post 6104442)
Perhaps you can adapt your own script to make sure that '1000' is not getting used by it? You'll find many systems in the wild that have the regular user with UidNumber 1000.

I can use any custom UID numbers when making users in the livecd environment, my concern is about the situation when I will apply this to my future fresh Slackware 15 installed from scratch (I prefer to reinstall every release rather than upgrading to it) which will still use the /home + some other filesystems with uid=1000 for the main user, so I would have to run a full scan and chown a lot of stuff.

However, I see that make_slackware_live.sh script hardcodes uid=1000 when creating the live user and that value is not used anywhere else. I think I can just make a private fork with some other hardcoded valid uid value and use it for personal purposes.

Alien Bob 03-31-2020 06:49 AM

No need for a fork. I think I implemented this in a way that everybody is happy. You can now set a number other than 1000 in the .conf file: https://git.slackware.nl/liveslak/co...be651dfe7e4049

FlinchX 04-01-2020 02:09 AM

Thank you.


All times are GMT -5. The time now is 02:50 PM.