Change Request: New Environmental Variable for Username

Roeland M.J. Meyer rmeyer at mhsc.com
Tue Feb 1 08:56:21 GMT 2000


I apologize,

I thought I was writing to a fellow programmer. The answer is that Samba
doesn't do this now. However, the obvious direction is to use the GCOS field
to hold the Samba identity. Most Samba users do not have a shell account
anyway, or don't use it much if they did. Mostly the GCOS field is used for
cosmetic reasons that do not effect non-shell users. Granted, some SA's
might bitch.

However, there are a LOT of benefits to using the GCOS field in this way.
Since it is already picked up when reading the passwd entry there is no
additional I/O overhead. Also, one doesn't have yet another control file to
manage. Finger would then yield the Samba UID if enabled. It also aids
single-logon.

Personally, I have never liked the separate smbpasswd file, although I do
understand why it is separate and treated like the shadow file (SMB passwds
being as secure as they are). On new systems, I ALWAYS have to fiddle with
the adduser script when installing Samba. It isn't difficult, but it adds to
the "tinker factor", which Unix has generally too much of.

Tinker points are like fleas, each are almost insignificant, but enough of
them will kill you. Each Tinker Point adds to the "Tinker factor" involved
in managing a system, be it Unix or otherwise. Each aditional option or
configuration item is a "tinker point". It is also, yet another test point.
===========================================
R O E L A N D  M. J. M E Y E R
----------------------------------------------------------------------------
----------



> -----Original Message-----
> From: Crist J. Clark [mailto:cjc at cc942873-a.ewndsr1.nj.home.com]
> Sent: Monday, January 31, 2000 9:15 PM
> To: Roeland M.J. Meyer
> Cc: Multiple recipients of list SAMBA
> Subject: Re: Change Request: New Environmental Variable for Username
>
>
> On Mon, Jan 31, 2000 at 09:52:10AM -0800, Roeland M.J. Meyer wrote:
> > Yet another way is to use the GCOS field in passwd.
>
> How does one do that? I can find no documentation about how Samba uses
> these fields in any special way.
>
> Or are you suggesting that this would be another potential way to add
> such functionality?
>
> > > -----Original Message-----
> > > From: samba at samba.org [mailto:samba at samba.org]On Behalf Of Crist J.
> > > Clark
> > > Sent: Monday, January 31, 2000 9:37 AM
> > > To: Multiple recipients of list SAMBA
> > > Subject: Change Request: New Environmental Variable for Username
> > >
> > >
> > > Presently, the Samba documentation says that the default NetBIOS
> > > username used by client-type applications is determined by the
> > > following (from smbclient(1)),
> > >
> > >               If no username is supplied, it will default  to  an
> > >               uppercase  version of the environment variable USER
> > >               or LOGNAME in that order.  If no username  is  sup-
> > >               plied  and  neither environment variable exists the
> > >               username "GUEST" will be used.
> > >
> > > However, very frequently a username on a given machine might not
> > > exactly match the username on another, but users may still have a
> > > nearly one-to-one mapping from one machine to another. Changing the
> > > USER or LOGNAME variables on the local machine can break local
> > > applications. So at present, users need to use the '-U' switch on the
> > > command line every time to enter their username on the foreign server.
> > >
> > > I propose that using an additional environmental variable,
> > > e.g. SMBUSER, would make life easier for such users. This variable
> > > could be set once in a user's startup files, and they would no longer
> > > need to enter the '-U' option each time they used a Samba client.
> > >
> > > For example, user 'johnd' on machineA has an acount on machineB called
> > > 'jdoe'. Our user need only set SMBUSER equal to 'jdoe' in his startup
> > > on machineA, and he no longer needs to type it everytime.
> > >
> > > If the SMBUSER variable is not set, Samba would default to the current
> > > behavior. When it is set, that name is used. The '%' character can
> > > have the same special meaning as it does for USER or LOGNAME.
> > >
> > > I'd be willing to write the patch, but I thought I would submit the
> > > idea first. It seems so obvious to me that I worry that there is some
> > > very good reason NOT to do this.
> > >
> > > Thanks for your time.
> > > --
> > > Crist J. Clark                           cjclark at home.com
> > >
> > >
>
> --
> Crist J. Clark                           cjclark at home.com
>



More information about the samba mailing list