Change Request: New Environmental Variable for Username

Crist J. Clark cjc at cc942873-a.ewndsr1.nj.home.com
Tue Feb 1 05:15:10 GMT 2000


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