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 |
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.
|
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 |
All times are GMT -5. The time now is 10:46 AM. |