Determine how to handle user/group creation #13

Open
opened 2024-01-02 08:46:18 -07:00 by nitori · 5 comments
Owner

openntpd (introduced in bd5572eef5) automatically creates a user and group upon installation if needed:

#!/bin/sh -e

if ! grep -Fq ntpd /etc/group; then
        echo "Creating ntpd user."
        addgroup -S ntpd
fi

if ! grep -Fq ntpd /etc/passwd; then
        echo "Creating ntpd group."
        adduser -S -h /var/empty -G ntpd ntpd
fi

The user and group is not removed with the package, and an informational message is printed to the console upon removal.

#!/bin/sh

cat <<EOF
A dedicated user and group was created for openntpd when it was installed.
You may be interested in removing them, which you can do so with:
# deluser ntpd
EOF

Good enough? Or should more or less be done?
FWIW, kiss-community/community repo does not create the user for their openntpd package and instead asks the user to do so themself.

openntpd (introduced in bd5572eef5ea17473f5e859d310af01e92a37ab7) automatically creates a user and group upon installation if needed: ```sh #!/bin/sh -e if ! grep -Fq ntpd /etc/group; then echo "Creating ntpd user." addgroup -S ntpd fi if ! grep -Fq ntpd /etc/passwd; then echo "Creating ntpd group." adduser -S -h /var/empty -G ntpd ntpd fi ``` The user and group is not removed with the package, and an informational message is printed to the console upon removal. ```sh #!/bin/sh cat <<EOF A dedicated user and group was created for openntpd when it was installed. You may be interested in removing them, which you can do so with: # deluser ntpd EOF ``` Good enough? Or should more or less be done? FWIW, kiss-community/community repo does not create the user for their openntpd package and instead asks the user to do so themself.
Owner

I think auto-creating and notifying on removal is good enough.

I think auto-creating and notifying on removal is good enough.
emma closed this issue 2024-01-02 14:02:21 -07:00
Owner

I personally would prefer letting the user create the group so they can configure the system to their liking if they wish the setup to be different.

I personally would prefer letting the user create the group so they can configure the system to their liking if they wish the setup to be different.
emma reopened this issue 2024-01-02 14:07:07 -07:00
Owner

I personally would prefer letting the user create the group so they can configure the system to their liking if they wish the setup to be different.

if we do prompt to create a user & group then we should specify what the default is. my main concern is that someone would set & forget a name for it and then while seeking support it adds an extra step of complication.

> I personally would prefer letting the user create the group so they can configure the system to their liking if they wish the setup to be different. if we do prompt to create a user & group then we should specify what the default is. my main concern is that someone would set & forget a name for it and then while seeking support it adds an extra step of complication.
Owner

I would prefer to have one default style for the reasons you mention but I know often distributions have made users/groups for me with silly names. I can't think of an example off the top of my head but I know I had to patch android-udev-rules to make it use wheel for adb access and not the perhaps more descriptive but in my mind unnecessary additional group adbusers.

I would prefer to have one default style for the reasons you mention but I know often distributions have made users/groups for me with silly names. I can't think of an example off the top of my head but I know [I had to patch android-udev-rules](https://git.sr.ht/~trinity/src/tree/main/item/soft/android-udev-rules) to make it use `wheel` for adb access and not the perhaps more descriptive but in my mind unnecessary additional group `adbusers`.
Owner

It would be easier to follow in the footsteps of kiss-community. I haven’t taken a look to see if this is exactly how they handle it, but i think we should specify a default and let the user leave the name empty if they want to keep the default.

It would be easier to follow in the footsteps of kiss-community. I haven’t taken a look to see if this is exactly how they handle it, but i think we should specify a default and let the user leave the name empty if they want to keep the default.
emma added the
question
label 2024-01-29 11:40:27 -07:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: bonsai/repo#13
No description provided.