LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   XDM and permissions (https://www.linuxquestions.org/questions/slackware-14/xdm-and-permissions-4175617464/)

martinsch 11-12-2017 07:12 AM

XDM and permissions
 
I'm using Slackware (at the moment Slackware 14.2) now for several years and this is my first question to the audience:

When I log into X (fluxbox) over XDM (runlevel 4) as normal user and want to start my Scanner (Canon lide 50) there appears a message, that there is no scanner available. If I do this as root, there is no trouble and I can scan.

My workaround at the moment is following, I start using runlevel 3 and get into X (fluxbox) by typing startx and I can use my scanner as normal user.

How can i get it work as normal user and using XDM?

thanks to all replies

Martin

bassmadrigal 11-12-2017 07:49 AM

This is probably happening because you didn't add your user to the recommended groups (when using the adduser command, at one point it will prompt you to press "up" to add the user to the recommended groups). Slackware will temporarily add a user to some groups by default if booting to runlevel 3, but it doesn't with runlevel 4.

The recommended groups in Slackware 14.2 are:

Code:

jbhansen@craven-moorhead:~$ groups
users lp floppy audio video cdrom plugdev power netdev scanner

To add yourself to those groups, run the following command as root, replacing $USER with your local username.

Code:

usermod -a -G lp floppy audio video cdrom plugdev power netdev scanner $USER
You may need to log out and log back in for this to take effect.

martinsch 11-12-2017 08:16 AM

Perfect! After adding my user-id to the recommended groups the Scanner works when logging-in over Xdm.

Greets, martin

Gerard Lally 11-12-2017 08:50 AM

Quote:

Originally Posted by bassmadrigal (Post 5779748)
Slackware will temporarily add a user to some groups by default if booting to runlevel 3, but it doesn't with runlevel 4.

Interesting. What's the reasoning behind that?

bassmadrigal 11-12-2017 04:08 PM

Quote:

Originally Posted by Gerard Lally (Post 5779757)
Interesting. What's the reasoning behind that?

Alien Bob states that it only applies to users logging into the console (meaning they're physically at the computer, not a remote ssh) allowing them access to local hardware, where graphical logins can be remote and you don't want them to have access to local hardware unless specifically allowed. The default groups are covered in /etc/login.defs

Code:

#
# List of groups to add to the user's supplementary group set
# when logging in on the console (as determined by the CONSOLE
# setting).  Default is none.
#
# Use with caution - it is possible for users to gain permanent
# access to these groups, even when not logged in on the console.
# How to do it is left as an exercise for the reader...
#
# Most of these groups are self-explanatory, but in the case of
# "lp", it is because group lp is needed to use a scanner that
# is part of a multifunction printer.
#
# Note that users are added to these default groups only when
# logging into a shell with /bin/login, not when using a login
# manager such as kdm.  In that case, users who should have
# hardware access must be added to the appropriate groups
# when the user is added with adduser or useradd, or by editing
# /etc/group directly, preferably using "vigr"
#
CONSOLE_GROUPS        floppy:audio:cdrom:video:lp:scanner



All times are GMT -5. The time now is 09:01 AM.