Christian Gennerat
2005-Nov-29 07:33 UTC
Bug#341202: adduser: gecos option: only last field is set
Package: adduser Version: 3.77 Severity: important Tags: patch Problem: chfn puts default value for all non-specified fields. only the last call to chfn have effect. Solution: do only one call to chfn Proposed code: sub ch_gecos { my $gecos = shift; my @gparm=(''-f'', $gecos); if($gecos =~ /,/) { my($gecos_name,$gecos_room,$gecos_work,$gecos_home,$gecos_other) = split(/,/,$gecos); @gparm=(''-f'', $gecos_name, ''-r'', $gecos_room); push(@gparm,''-w'', $gecos_work) if(defined($gecos_work)); push(@gparm,''-h'', $gecos_home) if(defined($gecos_home)); push(@gparm,''-o'', $gecos_other) if(defined($gecos_other)); } &systemcall(''/usr/bin/chfn'', @gparm, $new_name); } -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (500, ''testing''), (500, ''stable'') Architecture: i386 (i586) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.4.23 Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15) (ignored: LC_ALL set to fr_FR@euro) Versions of packages adduser depends on: ii debconf [debconf-2.0] 1.4.59 Debian configuration management sy ii passwd 1:4.0.13-1 change and administer password and ii perl-base 5.8.7-7 The Pathologically Eclectic Rubbis adduser recommends no packages. -- debconf information: * adduser/homedir-permission: true
Marc Haber
2005-Nov-29 10:33 UTC
[Adduser-devel] Bug#341202: adduser: gecos option: only last field is set
tags #341202 - patch tags #341202 unreproducible moreinfo thanks On Tue, Nov 29, 2005 at 08:19:21AM +0100, Christian Gennerat wrote:> chfn puts default value for all non-specified fields. > only the last call to chfn have effect.I cannot reproduce this here: Script started on Tue Nov 29 10:20:29 2005 $ sudo adduser u341202 Adding user `u341202''... Adding new group `u341202'' (1002). Adding new user `u341202'' (1002) with group `u341202''. Creating home directory `/home/u341202''. Copying files from `/etc/skel'' Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for u341202 Enter the new value, or press ENTER for the default Full Name []: Name Room Number []: Room Work Phone []: Work Home Phone []: Home Other []: Other Is the information correct? [y/N] y $ grep u3412092 /etc/passwd u341202:x:1002:1002:Name,Room,Work,Home,Other:/home/u341202:/bin/bash $ chfn -w WorkNew u341202 $ grep u341202 /etc/passwd u341202:x:1002:1002:Name,Room,WorkNew,Home,Other:/home/u341202:/bin/bash $ Script done on Tue Nov 29 10:21:08 2005 Please provide a typescript that shows how to reproduce your claim. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
Debian Bug Tracking System
2005-Nov-29 10:33 UTC
[Adduser-devel] Processed: Re: Bug#341202: adduser: gecos option: only last field is set
Processing commands for control@bugs.debian.org:> tags #341202 - patchBug#341202: adduser: gecos option: only last field is set Tags were: patch Tags removed: patch> tags #341202 unreproducible moreinfoBug#341202: adduser: gecos option: only last field is set There were no tags set. Tags added: unreproducible, moreinfo> thanksStopping processing here. Please contact me if you need assistance. Debian bug tracking system administrator (administrator, Debian Bugs database)
Debian Bug Tracking System
2006-Apr-13 13:08 UTC
[Adduser-devel] Bug#341202: marked as done (adduser: gecos option: only last field is set)
Your message dated Thu, 13 Apr 2006 15:02:29 +0200 with message-id <20060413130229.GA17547@nechayev.zugschlus.de> and subject line Bug#341202: Re: [Adduser-devel] Bug#341202: still reproductible has caused the attached Bug report to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database) -------------- next part -------------- An embedded message was scrubbed... From: Christian Gennerat <Christian.Gennerat@m4x.org> Subject: adduser: gecos option: only last field is set Date: Tue, 29 Nov 2005 08:19:21 +0100 Size: 2555 Url: http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20060413/70913499/attachment.mht -------------- next part -------------- An embedded message was scrubbed... From: Marc Haber <mh+debian-packages@zugschlus.de> Subject: Re: Bug#341202: Re: [Adduser-devel] Bug#341202: still reproductible Date: Thu, 13 Apr 2006 15:02:29 +0200 Size: 1844 Url: http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20060413/70913499/attachment-0001.mht