LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-11-2024, 12:40 PM   #1
lostintime
Member
 
Registered: Dec 2021
Posts: 204

Rep: Reputation: Disabled
/usr/sbin/adduser and setting initial group


When setting the initial group there is no option to use a group name of the same name as the user. Admin opinions about whether such a group is needed probably vary.

Should the Slackware adduser script support setting the initial group to the same as the new user name? Or have I overlooked something obvious by not using this script in a long time?

Thanks.
 
Old 05-11-2024, 03:47 PM   #2
Windu
Member
 
Registered: Aug 2021
Distribution: Arch Linux, Debian, Slackware
Posts: 594

Rep: Reputation: Disabled
The Slackware "adduser" script may not support it, but the system tool "useradd" supports this out of the box in Slackware. If you simply type "useradd foo" then user and group "foo" will be created where uidNumber equals gidNumber and "foo" will be the primary group for user "foo".
 
1 members found this post helpful.
Old 05-11-2024, 04:04 PM   #3
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,916

Rep: Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033Reputation: 5033
Quote:
Originally Posted by Windu View Post
If you simply type "useradd foo" then user and group "foo" will be created where uidNumber equals gidNumber and "foo" will be the primary group for user "foo".
Is that actually how it works? I was under the impression that it will create a group of the same name but that the uid/gid are not guaranteed to match as it just picks the first unused id in each case.

I usually find a uid/gid pair manually and then explicitly state it on the groupadd and useradd commands. I also use gpasswd -A to make the user the administrator of their own group.

I never use adduser.

Last edited by GazL; 05-11-2024 at 04:06 PM.
 
Old 05-11-2024, 04:22 PM   #4
JayByrd
Member
 
Registered: Aug 2021
Location: Seattle, WA
Distribution: Slackware
Posts: 302

Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
Quote:
Originally Posted by GazL View Post
...
I usually find a uid/gid pair manually and then explicitly state it on the groupadd and useradd commands...I never use adduser.
+1

As far as Slackware's adduser utility, I'll use that for real people, but for software/daemons (in my case the BOINC client,) I do it exactly as GazL suggests.
 
Old 05-15-2024, 12:00 PM   #5
wigums
Member
 
Registered: Oct 2013
Location: Detroit
Distribution: slackware and raspbian
Posts: 138

Rep: Reputation: Disabled
as far as suggesting which groups to initially make a user part of ........

when you get to that part of adduser just hit the up arrow one time. this will cycle through a few suggestions but i use the first.... add "wheel" to the end and youre golden
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/sbin/httpd: symbol lookup error: /usr/sbin/httpd: undefined symbol: apr_atomic_x dasoberdick Slackware 16 10-11-2014 02:36 AM
/usr/sbin/pmi and /usr/sbin/hibernate Woodsman Slackware 1 08-31-2013 10:41 PM
Error: Cannot find 'ssh-keygen' in '/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin' venu.navat Linux - Software 3 03-08-2012 04:00 AM
/bin, /sbin, /usr/bin, /usr/sbin - why are there 4? EmrldDrgn Linux - Newbie 3 11-18-2008 09:59 PM
As root, not seeing /sbin and /usr/sbin in path weghman Linux - Newbie 3 04-25-2004 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration