LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-21-2007, 05:20 AM   #1
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
New user not assigned to any groups by default?


I just finished another installation of Debian Lenny on a desktop machine. I do not often install Debian from scratch on a desktop, usually it is an upgrade and then I am not confronted with this problem.

When I add myself as user, I am only assigned to the 'user' group. But I need to be member of a whole lot of more groups, like audio, video, scanner, cdrom etc.

Most other users get logged in thru NIS, and if they exist, it is no problem. But I am myself always an ordinary user to be able to get in in case NIS is down.

Just out of curiosity: is it really needed to assign new users to all groups? Unfortunately, that means even so many useradd commands as this group add command takes only one group at a time. Is there a setting somewhere to determine the default groups (plural) for a new user? Or should I simply write a small script and take life as it is?

jlinkels
 
Old 11-21-2007, 06:36 AM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
It looks like a wrapper script is the way to go. On my system, the man page for useradd describes the /etc/default/useradd file, but it doesn't seem to have a groups entry. When I run useradd -D to see the defaults, there is one for GROUP, but not GROUPS.
 
Old 11-21-2007, 07:29 AM   #3
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Original Poster
Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Correct.

With adduser, you can assign the user to one group during creation and then to one groud at a time.

With useradd you can assign the user to more groups during creation but not afterwards.

In the adduser man page it is mentioned that a custom script can be run, but there are no further explanations, neither in the adduser man page, nor in the adduser.conf man page.

You confirm my idea about a wrapper script, server based so I can access it from every machine.

After writing my original question I was wondering how e.g. Ubuntu handles this. Obviously it will be a GUI based tool, and I cannot imagine that the admin has to include the user in groups like audio etc. I should peek at an Unbuntu machine as well.

jlinkels
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
groups (system default groups) Xavius Linux - General 2 07-18-2012 02:50 AM
default groups - which are ok to delete? dcyfer Slackware 2 01-30-2007 09:20 PM
default groups zowey Ubuntu 3 08-22-2006 12:05 PM
Default groups for first ubuntu user magnum81 Ubuntu 1 05-06-2006 10:27 PM
Default user groups Markup Linux - General 4 08-15-2005 04:08 AM

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

All times are GMT -5. The time now is 08:32 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