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 03-22-2023, 06:02 AM   #31
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402

Quote:
Originally Posted by chrisretusn View Post
I rarely use sudo. I was not aware of a sudo group. Must be a *buntu thing. I good with logging in as root or using su.
Perhaps. Group 'wheel' is used in all distributions I have used. Even the default sudoers has an entry (maybe commented out depending on distro) for wheel.
 
Old 03-22-2023, 06:05 AM   #32
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834
Blog Entries: 17

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by henca View Post
In your list of groups, I am not sure if you want to put a normal user in the sddm group. However, I can't say for sure as I don't use sddm myself.
I've tried sddm once, and I couldn't run it manually (as oppose to runlevel 4). I probably should have been in the sddm group to be able to run it, since sddm runs X for you, and you probably can't login to X through sddm without that access?

Last edited by zeebra; 03-22-2023 at 12:45 PM.
 
Old 03-22-2023, 07:46 AM   #33
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,967

Rep: Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577
Quote:
Originally Posted by Jeebizz View Post
Video - same thing, should I still be part of video these days?
Quote:
Originally Posted by zeebra View Post
Probably not unless you need it for a specific reason, like running KVM/QEMU as a user session with GPU passthrough or something like that.

Code:
ls -la /dev/dri
/dev/dri/card0 root video
/dev/dri/renderD128 root video
Let's look at it closer:
Code:
$ ls -l /dev/dri/card0
crw-rw----+ 1 root video 226, 0 2023-03-17 16:02 /dev/dri/card0

$ getfacl /dev/dri/card0
getfacl: Removing leading '/' from absolute path names
# file: dev/dri/card0
# owner: root
# group: video
user::rw-
user:kaukasoi:rw-
group::rw-
mask::rw-
other::---
There is an extra '+' after 'crw-rw----', meaning there is a file access control list. getfacl shows that the owner is root but user kaukasoi (me) also has read/write access. So, I don't need to be in group video to access /dev/dri/card0. Who gave me that access? elogind+eudev. They know I have logged in locally (see "loginctl list-sessions") and therefore I may need access to the graphics hardware. I also have a cdrom drive:
Code:
$ ls -l /dev/sr0 
brw-rw----+ 1 root cdrom 11, 0 2023-03-17 16:02 /dev/sr0
$ getfacl /dev/sr0
getfacl: Removing leading '/' from absolute path names
# file: dev/sr0
# owner: root
# group: cdrom
user::rw-
user:kaukasoi:rw-
group::rw-
mask::rw-
other::---
I am allowed to burn cdroms without being in group cdrom.

The old way of giving static group access via /etc/group means even non-local users have access to peripherals while some other (local) user is using the machine simultaneously. It's not needed any longer, which is a good thing in a multi-user environment. It's not a good idea to let others read your mouse, display, usb stick etc.

Last edited by Petri Kaukasoina; 03-22-2023 at 07:52 AM.
 
Old 03-22-2023, 07:48 AM   #34
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,967

Rep: Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577Reputation: 1577
Quote:
Originally Posted by zeebra View Post
I've tried sddm once, and I couldn't run it. I probably should have been in the sddm group to be able to run it, since sddm runs X for you, and you probably can't login to X through sddm without that access?
I have never been in group sddm, and I can login to X using sddm.
 
Old 03-22-2023, 07:54 AM   #35
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,302
Blog Entries: 61

Rep: Reputation: Disabled
About groups:
Arch wiki group information:
https://wiki.archlinux.org/title/Use...ser_management

Debian group information:
https://wiki.debian.org/SystemGroups
 
Old 03-22-2023, 11:03 AM   #36
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,200

Original Poster
Rep: Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387
Quote:
Originally Posted by zeebra View Post
Probably not unless you need it for a specific reason, like running KVM/QEMU as a user session with GPU passthrough or something like that.

Code:
ls -la /dev/video*
/dev/video0 root video
/dev/video1 root video
Code:
ls -la /dev/dri
/dev/dri/card0 root video
/dev/dri/renderD128 root video
Maybe if you play "real" games on your computer, they might need it.
GPU passthrough is above my skill level anyways, but I don't need to be part of video for DRi on my GPU? Also does emulation count as real games (console emulation)? Only actual other games I have played is xonotic.
 
Old 03-22-2023, 11:29 AM   #37
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 3,000

Rep: Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565
I see no reason to mess with what is not broken. This has served me well. The groups I am in as shown in my post above. Repeated here:
Code:
grep chris /etc/group
lp:x:7:lp,chris
wheel:x:10:root,chris
floppy:x:11:chris
audio:x:17:chris,pulse,root
video:x:18:chris,sddm
cdrom:x:19:chris
input:x:71:chris
plugdev:x:83:chris
power:x:84:chris
netdev:x:86:chris
scanner:x:93:chris
vboxusers:x:215:chris
wireshark:x:361:chris
These in bold are all assigned when using "adduser" to add a new user.ISomething a normally do when adding new users or my self to a new system. I view this as Slackware standard.

Last edited by chrisretusn; 03-22-2023 at 10:56 PM.
 
Old 03-22-2023, 12:13 PM   #38
metaed
Member
 
Registered: Apr 2022
Location: US
Distribution: Slackware64 15.0
Posts: 385

Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by chrisretusn View Post
These in bold are all assigned when using "adduser" to add a new user
Except wheel, yes?
 
Old 03-22-2023, 12:25 PM   #39
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,767

Rep: Reputation: Disabled
From "man useradd" -G part:
Code:
The default is for the user to belong only to the initial group.
Because of this, I think it's a safe default to only have one group for regular user.
 
Old 03-22-2023, 12:41 PM   #40
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,200

Original Poster
Rep: Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387
Quote:
Originally Posted by chrisretusn View Post
I see no reason to mess with what is not broken. This has served me well. The groups I am in as shown in my post above. Repeated here:
Code:
grep chris /etc/group
lp:x:7:lp,chris
wheel:x:10:root,chris
floppy:x:11:chris
audio:x:17:chris,pulse,root
video:x:18:chris,sddm
cdrom:x:19:chris
input:x:71:chris
plugdev:x:83:chris
power:x:84:chris
netdev:x:86:chris
scanner:x:93:chris
vboxusers:x:215:chris
wireshark:x:361:chris
These in bold are all assigned when using "adduser" to add a new user.ISomething a normally do when adding new users or my self to a new system. I view this as Slackware standard.
Is lp for printing? I am not part of that, and I can print just fine, same with scanner - I just have a printer and non of thew crap multifunction printer/scanner devices, but I am not part of scanner and I can print still (hplip)...
 
Old 03-22-2023, 01:54 PM   #41
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,200

Original Poster
Rep: Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387Reputation: 1387
So from the debian site:

Quote:
netdev: Members of this group can manage network interfaces through the network manager and wicd.
Don't really need it, so guess I'll remove myself from that.

Quote:
video: This group can be used locally to give a set of users access to a video device (like a webcam).
I haven't used a webcam in a while - (how does this apply to integrated webcams on a notebook though?), but if thats the main purpose and doesn't imply I need it for DRI for my GPU, I guess I can remove myself from that too.

Quote:
scanner : Members of this group can enable and use scanners.
Gone, i don't have a scanner.

Quote:
users: While Debian systems use the private user group system by default (each user has their own group), some prefer to use a more traditional group system, in which each user is a member of this group.
I am part of this group, and I do not know if it is good practice, but I have chowned my external HD as users so I can access it on my other Linux machine (notebook).

Last edited by Jeebizz; 03-22-2023 at 01:58 PM.
 
Old 03-22-2023, 02:47 PM   #42
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,302
Blog Entries: 61

Rep: Reputation: Disabled
Quote:
Originally Posted by elcore View Post
From "man useradd" -G part:
Code:
The default is for the user to belong only to the initial group.
Because of this, I think it's a safe default to only have one group for regular user.
I always use adduser, as mentioned here:
Quote:
Originally Posted by Petri Kaukasoina View Post
/usr/sbin/adduser script tells to press the UP arrow key to add/select/edit additional groups. And it proposes this list of "additional groups for desktop users": "audio cdrom floppy input lp netdev plugdev power scanner video"
Check out the authors of the script, I think they're reliable, and know what's safe.
 
Old 03-22-2023, 03:05 PM   #43
henca
Senior Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 1,037

Rep: Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698
Quote:
Originally Posted by brianL View Post
Yes, I know I should have edited /etc/sudoers using visudo, but I've never been good at doing what I should do. And no harm done.
If you prefer some other editor than vi (and many people do), you can still use visudo the right way by setting the EDITOR environment variable:

Code:
export EDITOR=nano
visudo
That way you can use your favorite editor but still edit the sudoers file in a safe, locked way. Visudo will also do some syntax checking.

regards Henrik
 
1 members found this post helpful.
Old 03-22-2023, 03:10 PM   #44
henca
Senior Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 1,037

Rep: Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698
Quote:
Originally Posted by zeebra View Post
I've tried sddm once, and I couldn't run it manually (as oppose to runlevel 4). I probably should have been in the sddm group to be able to run it, since sddm runs X for you, and you probably can't login to X through sddm without that access?
The sddm process (as any login manager like xdm, gdm, kdm) should be run as root because only root is able to become other users. When you log in with sddm you want to become your own normal user.

However, all normal users should be able to login with a login manager without having to be member of a group.

regards Henrik
 
Old 03-22-2023, 03:13 PM   #45
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,302
Blog Entries: 61

Rep: Reputation: Disabled
Thanks, Henrik. I'll do that. And I will learn how to use vi/vim (I've been saying that for years).
 
  


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
LXer: Put Design Thinking into practice with the Open Practice Library LXer Syndicated Linux News 0 07-22-2022 01:02 AM
group name is not showing when I do $id but group id exists under /etc/group Manohartk Linux - Newbie 4 07-05-2021 08:10 PM
Good practice - group memberships MudPuppy Slackware 5 04-11-2012 11:37 AM
Block bitmap for group 416 not in group (block 0) + group descriptors corrupted? quanta Linux - Server 1 12-08-2010 10:40 AM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 04:01 PM

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

All times are GMT -5. The time now is 11:56 PM.

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