smbldap-useradd should set gecos and displayName to username if none specified.

Bug #68386 reported by Zach on 2006-10-26
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
smbldap-tools (Ubuntu)
Undecided
Unassigned

Bug Description

When adding a user with the smbldap-useradd script, the gecos attribute, and, by extension, the displayName attribute are determined by the "userGecos=" option in smbldap.conf. This usually is set to "System User". As a result, all users get "System User" for their gecos and displayName. This is especially frustrating for windows users whose name displayed in the start menu (and presumably other places) is "System User" rather than something that uniquely identifies them such as username.

The script should default to something more reasonable such as username if no '-c' option is specified.

Zach (uid000) wrote :

I am attaching a diff that addresses this behavior in the smbldap-useradd script.

The patch causes the script to first get the $config{userGecos} value from $Options{'c'} if defined, and otherwise from $userName.

This assignment is based on the $givenName and $userSN assignments which are very similar.

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest Ubuntu release? Thanks in advance.

Changed in smbldap-tools:
assignee: nobody → andrea-bs
status: New → Incomplete
Changed in smbldap-tools:
assignee: andrea-bs → nobody
Zach (uid000) wrote :

I haven't checked the latest version of the smbldap perl scripts--i'm running ubuntu 8.04 on my samba server. However a quick look at the srouce should tell if gecos is being set properly.

Zach (uid000) wrote :

I just installed smbldap-tools on my 8.10 desktop. Even though my desktop isn't configured to run the scripts, i took a quick look at the source.
At line 243 of smbldap-useradd, the gecos assignment is the same as always:
$config{userGecos} = $tmp if (defined($tmp = $Options{'c'}));
It should be
$config{userGecos} = ($Options{'c'} || $userName);
so that it get is from the -c option if specified but defaults to using the username.

Launchpad Janitor (janitor) wrote :

[Expired for smbldap-tools (Ubuntu) because there has been no activity for 60 days.]

Changed in smbldap-tools (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers