useradd problem(!)
Hello When I first installed Debian GNU/Linux on this machine, I reconfigured it so that there is a central user-group called users which all users of this system belong to. I have now reconfigured it back to the default: /etc/adduser.conf [...] USERGROUPS=yes [...] When running useradd, though, I get the following: # useradd -m test # ls -l /home [...] drwxr-sr-x 18 svn users1024 Jan 4 23:28 svn drwxr-xr-x2 test users1024 Jan 4 23:30 test There. The new user 'test' still belongs to 'users' and doesn't get a new group called 'test'. I was curious, so I ran strace over adduser: [first deleted 'test' again] # strace useradd -m test [...] open(/etc/default/useradd, O_RDONLY) = -1 ENOENT (No such file or directory) [...] access(/home/test, F_OK) = -1 ENOENT (No such file or directory) mkdir(/home/test, 0) = 0 [...] chown(/home/test, 1001, 100) = 0 -- why GID 100? [...] (sorry for the long lines) First, why is useradd looking for a file at /etc/default/useradd? Is this an old location or what? I have only the following there: total 8 -rw-r--r--1 root root 92 Aug 18 23:32 devpts -rwxr--r--1 root root 641 Aug 18 23:33 rcS Second, and this is my main problem, why is the GID 100? I have explicitly configured USERGROUPS=yes in /etc/adduser.conf! I run an up-to-date woody/testing here. Help greatly appreciated, Sven -- Powered by Debian GNU/Linux
Re: useradd problem(!)
On Thu, Jan 04, 2001 at 11:52:54PM +0100, Sven Burgener wrote: /etc/adduser.conf ... When running useradd, though, I get the following: useradd and adduser are two different programs from two different pacakges, the configuration of one does not affect the other: [EMAIL PROTECTED]:~$ dpkg -S /usr/sbin/useradd passwd: /usr/sbin/useradd [EMAIL PROTECTED]:~$ dpkg -S /usr/sbin/adduser adduser: /usr/sbin/adduser
Re: useradd problem(!)
* Sven Burgener ([EMAIL PROTECTED]) wrote: Hello When I first installed Debian GNU/Linux on this machine, I reconfigured it so that there is a central user-group called users which all users of this system belong to. I have now reconfigured it back to the default: /etc/adduser.conf [...] USERGROUPS=yes [...] When running useradd, though, I get the following: # useradd -m test # ls -l /home [...] drwxr-sr-x 18 svn users1024 Jan 4 23:28 svn drwxr-xr-x2 test users1024 Jan 4 23:30 test There. The new user 'test' still belongs to 'users' and doesn't get a new group called 'test'. Firstwhat version of adduser?? because in my version of adduser(3.11.1) idon't have that -m flag, now looking at the code, i didn't find it and in the man page i didn't find it either. About the user bit, the thing is if you have USERGROUPS=yes, and you have USER_GID=100 adduser it apparently is defaulting to use this value, i don't know why but it doesn't make sense the code is very sane, and in my interpretation of it this shouldn't happen maybe a bug don't know yet *shrug*, try using the --gid flag and see if it's fixed. I was curious, so I ran strace over adduser: [first deleted 'test' again] # strace useradd -m test [...] open(/etc/default/useradd, O_RDONLY) = -1 ENOENT (No such file or directory) [...] access(/home/test, F_OK) = -1 ENOENT (No such file or directory) mkdir(/home/test, 0) = 0 [...] chown(/home/test, 1001, 100) = 0 -- why GID 100? [...] See above. (sorry for the long lines) First, why is useradd looking for a file at /etc/default/useradd? Is this an old location or what? I have only the following there: I don't know if it's an old location, but it seems it checks to see if that file exist for some reason *shrug*. I don't see no reference to this in the code i have. total 8 -rw-r--r--1 root root 92 Aug 18 23:32 devpts -rwxr--r--1 root root 641 Aug 18 23:33 rcS Second, and this is my main problem, why is the GID 100? I have explicitly configured USERGROUPS=yes in /etc/adduser.conf! I run an up-to-date woody/testing here. I run up to date woody too, and i don't have this problem if i do useradd test i get the whole bunch of questions and the output of /home/test is: drwxr-xr-x2 test test1024 Jan 6 13:30 test HTH, Juan Fuentes
Re: useradd problem(!)
On Sat, Jan 06, 2001 at 05:44:04PM +, Malcolm Parsons wrote: useradd and adduser are two different programs from two different pacakges, the configuration of one does not affect the other: [EMAIL PROTECTED]:~$ dpkg -S /usr/sbin/useradd passwd: /usr/sbin/useradd [EMAIL PROTECTED]:~$ dpkg -S /usr/sbin/adduser adduser: /usr/sbin/adduser Yes, quite true. I got them mixed up. All my fault. :) Cheers, Sven