Initial user account created on install of Gutsy server is not added to admin group

Bug #158952 reported by Alex
16
Affects Status Importance Assigned to Milestone
user-setup (Ubuntu)
Fix Released
High
Colin Watson

Bug Description

Under the following circumstances, the initial user account fails to be added to the admin group, which results in the root account being inaccessible (sudo will fail).

 * The "mail server" installation profile is selected
 * "No configuration" is selected when the system asks which mail configuration to use

As a workaround, the system can be booted into recovery mode, and the following commands executed:

addgroup --system admin
adduser USERNAME admin
echo '%admin ALL=(ALL) ALL' >>/etc/sudoers

where "USERNAME" is the name of the initial user created during installation.

Then exit recovery mode, and sudo should succeed.

Related branches

Revision history for this message
Isolder (isolder-deactivatedaccount) wrote :

Hi, I can confirm this.

Just download 7.10 last night and did fresh install today. My user is not part of the admin group.

Very strange..

Revision history for this message
Thomas Babut (thbabut) wrote :

I did a server install with Ubuntu 7.10 (i386) server edition a few days ago and the user thomas created in the install process is in the following groups:

# grep thomas /etc/group
adm:x:4:thomas
dialout:x:20:thomas
cdrom:x:24:thomas
floppy:x:25:thomas
audio:x:29:thomas
dip:x:30:thomas
video:x:44:thomas
plugdev:x:46:thomas
scanner:x:104:thomas
thomas:x:1000:
lpadmin:x:109:thomas
admin:x:110:thomas

So for me it worked fine.

Revision history for this message
Thomas Babut (thbabut) wrote :

Here is a output from the logfiles of the install process:

# grep -nr thomas /var/log/installer
/var/log/installer/syslog:2628:Nov 10 09:38:28 user-setup: Adding user `thomas' ...
/var/log/installer/syslog:2629:Nov 10 09:38:28 user-setup: Adding new group `thomas' (1000) ...
/var/log/installer/syslog:2630:Nov 10 09:38:28 user-setup: Adding new user `thomas' (1000) with group `thomas' ...
/var/log/installer/syslog:2631:Nov 10 09:38:28 user-setup: Creating home directory `/home/thomas' ...
/var/log/installer/syslog:2658:Nov 10 09:38:28 user-setup: Adding user `thomas' to group `adm' ...
/var/log/installer/syslog:2667:Nov 10 09:38:28 user-setup: Adding user `thomas' to group `audio' ...
/var/log/installer/syslog:2676:Nov 10 09:38:29 user-setup: Adding user `thomas' to group `cdrom' ...
/var/log/installer/syslog:2685:Nov 10 09:38:29 user-setup: Adding user `thomas' to group `dialout' ...
/var/log/installer/syslog:2694:Nov 10 09:38:29 user-setup: Adding user `thomas' to group `floppy' ...
/var/log/installer/syslog:2703:Nov 10 09:38:29 user-setup: Adding user `thomas' to group `video' ...
/var/log/installer/syslog:2712:Nov 10 09:38:29 user-setup: Adding user `thomas' to group `plugdev' ...
/var/log/installer/syslog:2721:Nov 10 09:38:29 user-setup: Adding user `thomas' to group `dip' ...
/var/log/installer/syslog:2746:Nov 10 09:38:29 user-setup: Adding user `thomas' to group `lpadmin' ...
/var/log/installer/syslog:2755:Nov 10 09:38:30 user-setup: Adding user `thomas' to group `scanner' ...
/var/log/installer/syslog:2773:Nov 10 09:38:30 user-setup: Adding user `thomas' to group `admin' ...
/var/log/installer/cdebconf/questions.dat:3303:Value: thomas

Perhaps you could post your logfiles of the install process.

Changed in debian-installer:
status: New → Incomplete
Revision history for this message
Isolder (isolder-deactivatedaccount) wrote :

Next time I get a chance to boot the system I'll post the log. I had to go into recovery mode and add the line "admin:x:106:redone" to /etc/group and "%admin ALL=(ALL) ALL" to sudoers to get privileges.

/etc/group did not even have a line for 'admin'.

Revision history for this message
Isolder (isolder-deactivatedaccount) wrote :

As is shown below.. no admin created.

$ sudo grep -nr redone /var/log/installer
/var/log/installer/syslog:2762:Nov 16 10:39:28 user-setup: Adding user `redone' ...
/var/log/installer/syslog:2763:Nov 16 10:39:28 user-setup: Adding new group `redone' (1000) ...
/var/log/installer/syslog:2764:Nov 16 10:39:28 user-setup: Adding new user `redone' (1000) with group `redone' ...
/var/log/installer/syslog:2765:Nov 16 10:39:28 user-setup: Creating home directory `/home/redone' ...
/var/log/installer/syslog:2791:Nov 16 10:39:28 user-setup: Adding user `redone' to group `adm' ...
/var/log/installer/syslog:2800:Nov 16 10:39:28 user-setup: Adding user `redone' to group `audio' ...
/var/log/installer/syslog:2809:Nov 16 10:39:29 user-setup: Adding user `redone' to group `cdrom' ...
/var/log/installer/syslog:2818:Nov 16 10:39:29 user-setup: Adding user `redone' to group `dialout' ...
/var/log/installer/syslog:2827:Nov 16 10:39:29 user-setup: Adding user `redone' to group `floppy' ...
/var/log/installer/syslog:2836:Nov 16 10:39:29 user-setup: Adding user `redone' to group `video' ...
/var/log/installer/syslog:2845:Nov 16 10:39:29 user-setup: Adding user `redone' to group `plugdev' ...
/var/log/installer/syslog:2854:Nov 16 10:39:29 user-setup: Adding user `redone' to group `dip' ...
/var/log/installer/syslog:2879:Nov 16 10:39:30 user-setup: Adding user `redone' to group `lpadmin' ...
/var/log/installer/syslog:2888:Nov 16 10:39:30 user-setup: Adding user `redone' to group `scanner' ...
/var/log/installer/cdebconf/questions.dat:3274:Value: redone

Changed in debian-installer:
status: Incomplete → Confirmed
Revision history for this message
Alex (gralex) wrote :

Hi,

After doing some tests, it seems to me that it happens when the "Mail server" task is selected during install.

When it's not selected, the user is added to the admin group.

When it's selected, the user is not added to the admin group.

So far, I have no idea where the problem comes from and I don't understand how installing an email server can impact the sudo configuration :-/

Alex

Revision history for this message
Colin Watson (cjwatson) wrote :

Alex, could you please attach your *full* /var/log/installer/syslog (and preferably also /var/log/installer/cdebconf/questions.dat)? If I get the entire contents of those two files, I stand some chance of working out what went wrong. Thanks!

Changed in debian-installer:
assignee: nobody → kamion
status: Confirmed → Incomplete
Revision history for this message
Colin Watson (cjwatson) wrote :

David Linton sent me a syslog which answers the question: this happens only if you select "No configuration" in answer to the "General type of mail configuration:" question. The fix is straightforward, and will be forthcoming shortly. In the meantime, you can work around this by selecting something else in response to that question.

Changed in user-setup:
importance: Undecided → High
status: Incomplete → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

user-setup (1.16ubuntu1) hardy; urgency=low

  * Resynchronise with Debian. Remaining changes:
    - Adjust /etc/aliases to send root mail to the initial user.
    - Add the initial user to the adm, dip, lpadmin, and scanner groups too,
      and to the admin group if no root password is set.
    - Allow the admin group to gain root privileges using sudo.
    - Default passwd/root-login to false.
    - Don't reserve the 'hal' username in Ubuntu; we call it haldaemon.
    - Create the spu group on powerpc/ps3 and powerpc/cell.
  * Ignore failures from newaliases, which might be due to the user having
    declined to configure postfix (LP: #158952).

user-setup (1.16) unstable; urgency=low

  * Move menu item to come after base-installer, and just before apt-setup.

  [ Updated translations ]
  * Bengali (bn.po) by Jamil Ahmed
  * Punjabi (Gurmukhi) (pa.po) by A S Alam
  * Portuguese (pt.po) by Miguel Figueiredo

user-setup (1.15) unstable; urgency=low

  [ Otavio Salvador ]
  * Add support to control which default groups the initial user will be
    added. Preseed it at passwd/user-default-groups. Closes: #426452

 -- Colin Watson <email address hidden> Wed, 21 Nov 2007 00:05:52 +0000

Changed in user-setup:
status: Confirmed → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

I have also added this to the 7.10 release notes on the wiki, and requested an update of the copy on www.ubuntu.com.

Matt Zimmerman (mdz)
description: updated
Colin Watson (cjwatson)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.