Opened 14 years ago

Closed 14 years ago

#2493 closed defect (fixed)

append group instead of replacing current ones

Reported by: adrian Owned by: thomas
Priority: normal Milestone: 6.3
Component: BOOK Version: SVN
Severity: normal Keywords: append group instead replacing
Cc:

Description

In "Setting up a Subversion Server" (http://www.linuxfromscratch.org/blfs/view/svn/server/svnserver.html) in section 1 "Setup Users, Groups, and Permissions" the command to add the svn user to the group svntest is:

usermod -G svntest svn

which replaces svn user's current groups with group svntest. In my opinion it should be:

usermod -G svntest -a svn

which appends svntest to its groups. This change is "important" because the document is intended for multiple repositories so svn user shall be added to multiple groups.

I have to say that i'm quite new to linux so i'm not sure 100% this is correct, but i have already lost my sudo privileges with this command :)

a big thank you for your hard work it's very useful!

Attachments (1)

usermod-2.patch (5.5 KB ) - added by thomas 14 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by adrian, 14 years ago

Excuse me, I just noticed that in section 2 "Create a Subversion repository" the command:

usermod -G svn,svntest,<insert existing groups> <username>

could also be changed to:

usermod -G svn,svntest -a <username>

thanks!

comment:2 by thomas, 14 years ago

Owner: changed from blfs-book@… to thomas
Status: newassigned

thats a cool hint - i'll do that change. There seems to be no other chapter in the book where usermod is used that way, isn't it?

comment:3 by dnicholson@…, 14 years ago

I don't think there are any other places in the book where we do that, but there could be. For example, alsa-utils tells you to "usermod -a -G audio <user>", X Window System Components says "usermod -a -G video <user>", libusb says "usermod -a -G usb <user>", etc.

in reply to:  3 comment:4 by thomas, 14 years ago

hmm, cannot find those occurences you mentioned. Only svnserver.xml is using usermod command. Where/how did you find those statements? I did a "grep -r usermod BLFS/trunk/BOOK/*" and only svnserver.xml (and shadow.xml) came up...

comment:5 by dnicholson@…, 14 years ago

I meant that they don't exist now, but they could. Periodically it comes up on the list where someone can only get audio working as root (for instance). Partly it's because the book is not really explicit that "your user must be in group x to have capability y". I think adding example usermod commands in these sections could be helpful.

in reply to:  5 comment:6 by thomas, 14 years ago

Ah i see. Yeah, the "audio as root" is typically for such issues. I'll pick that up when start editing.

comment:7 by dnicholson@…, 14 years ago

Not to derail you, but there should probably be a separate ticket for the "be clearer about adding users to groups" part. If you don't just knock it out while you're working on this, please open a new ticket about that or just change the summary of this one.

by thomas, 14 years ago

Attachment: usermod-2.patch added

comment:8 by thomas, 14 years ago

I've added a patch which adds some usermod command to hal, ppp, x-setup, svnserver etc. Is this kind of change ok for you than i would commit that. Or is there something to make better?

comment:9 by dnicholson@…, 14 years ago

Yeah, that's nice. The only one I don't like is the PPP one since the the usermod is grouped with the actual package installation instructions, which doesn't seem appropriate. It would be better in the Configuration section somewhere.

Otherwise, it looks good to me. There are probably a couple grammar nitpicks, but those will get ironed out.

comment:10 by thomas, 14 years ago

Resolution: fixed
Status: assignedclosed

Fixed with r7338

Note: See TracTickets for help on using tickets.