RE: .login_conf ignored [solved]

2007-05-17 Thread Ernest Sales
On Wednesday, May 16, 2007 9:20 AM, Christopher Illies wrote:

> On Tue, May 15, 2007 at 06:39:05PM +0200, Ernest Sales wrote:
> > > > > > On Tue, 15 May 2007 09:14:42 +0200, Christopher
> Illies wrote:
> > > > > >
> > > > > > > The locale settings in my .login_conf are ignored:
>
> [...]
>
> > > > Try compiling just your ~/login_conf, make sure a
> > > > ~/login_conf.db file appears.
> > > >
> > > > Ernest
> > >
> > > Thanks, that has worked!
> > >
> > > Before I always used cap_mkdb /etc/login.conf plus all the user's
> > > $HOME/.login_conf, but just using it on my ~/.login_conf did the
> > > trick. A ~/.login_conf.db file has appeared.
> > >
> > > I feel a bit silly for not having come up with it myself.
> I guess what
> > > confused me was that on another user's account the
> cap_mkdb compiling
> > > wasn't neccessary, but I don't need to understand that now that it
> > > works for me.
> > >
> > > Thanks again.
> > >
> > > Christopher
> >
> > But you are still curious, aren't you?
>
> Yes
>
> > AFAIK, there are two possible
> > explanations:
> >
> > 1) There _is_ a .login_conf.db file in the other user's homedir.
>
> No
>
> >
> > 2) The other account pertains to a different login class than yours,
> > which already sets the desired locale and so masquerades the user's
> > settings being ignored. Dunno if a user can see his own
> login class. If
> > you have permissions, can use vipw to find out (if
> unfamiliar, take a
> > look to vipw(8) and passwd(5) manpages, notice the 'class' field).
> >
> > Ernest
>
> Not that I can see. I 'chris' is my login, and 'bill' in another
> account that does not have this problem:
>
> ; sudo  cat /etc/master.passwd | egrep 'chris|bill' | awk
> -F: '{ print $1,":", $5,":"}'
> chris :  :
> bill :  :
> ; whoami
> chris
> ; ls /home/bill/.login*
> /home/bill/.login   /home/bill/.login_conf
> ; cat /home/bill/.login_conf
> # $FreeBSD: src/share/skel/dot.login_conf,v 1.3 2001/06/10 17:08:53
> # ache Exp $
> #
> # see login.conf(5)
> #
> me:\
> :charset=iso-8859-1:\
> :lang=se_SE.ISO8859-1:
> ; sudo sed -i.bak -e 's/se_SE/de_DE/' /home/bill/.login_conf
> ; su -l bill
> Password:
> $ whoami
> bill
> $ env | egrep -i 'lang|charset'
> MM_CHARSET=iso-8859-1
> LANG=de_DE.ISO8859-1
>
> But to change settings on the 'chris' account I have to use cap_mkdb
> /home/chris/.login_conf. Strange...
>
> Christopher

And your test also discards some login script directly setting the variables
(assuming bill locale is usually se_SE). Wish some day we get enlightened.

Ernest


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: .login_conf ignored [solved]

2007-05-16 Thread Christopher Illies
On Tue, May 15, 2007 at 06:39:05PM +0200, Ernest Sales wrote:
> > > > > On Tue, 15 May 2007 09:14:42 +0200, Christopher Illies wrote:
> > > > >
> > > > > > The locale settings in my .login_conf are ignored:

[...]

> > > Try compiling just your ~/login_conf, make sure a
> > > ~/login_conf.db file appears.
> > >
> > > Ernest
> >
> > Thanks, that has worked!
> >
> > Before I always used cap_mkdb /etc/login.conf plus all the user's
> > $HOME/.login_conf, but just using it on my ~/.login_conf did the
> > trick. A ~/.login_conf.db file has appeared.
> >
> > I feel a bit silly for not having come up with it myself. I guess what
> > confused me was that on another user's account the cap_mkdb compiling
> > wasn't neccessary, but I don't need to understand that now that it
> > works for me.
> >
> > Thanks again.
> >
> > Christopher
> 
> But you are still curious, aren't you?

Yes

> AFAIK, there are two possible
> explanations:
> 
> 1) There _is_ a .login_conf.db file in the other user's homedir.

No

> 
> 2) The other account pertains to a different login class than yours,
> which already sets the desired locale and so masquerades the user's
> settings being ignored. Dunno if a user can see his own login class. If
> you have permissions, can use vipw to find out (if unfamiliar, take a
> look to vipw(8) and passwd(5) manpages, notice the 'class' field).
> 
> Ernest
 
Not that I can see. I 'chris' is my login, and 'bill' in another
account that does not have this problem:

; sudo  cat /etc/master.passwd | egrep 'chris|bill' | awk  -F: '{ print $1,":", 
$5,":"}'
chris :  :
bill :  :
; whoami
chris
; ls /home/bill/.login*
/home/bill/.login   /home/bill/.login_conf
; cat /home/bill/.login_conf
# $FreeBSD: src/share/skel/dot.login_conf,v 1.3 2001/06/10 17:08:53
# ache Exp $
#
# see login.conf(5)
#
me:\
:charset=iso-8859-1:\
:lang=se_SE.ISO8859-1:
; sudo sed -i.bak -e 's/se_SE/de_DE/' /home/bill/.login_conf
; su -l bill
Password:
$ whoami
bill
$ env | egrep -i 'lang|charset'
MM_CHARSET=iso-8859-1
LANG=de_DE.ISO8859-1

But to change settings on the 'chris' account I have to use cap_mkdb
/home/chris/.login_conf. Strange...

Christopher

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: .login_conf ignored [solved]

2007-05-15 Thread Ernest Sales
On Tuesday, May 15, 2007 5:00 PM, Christopher Illies wrote:

> On Tue, May 15, 2007 at 04:36:46PM +0200, Ernest Sales wrote:
> > On Tuesday, May 15, 2007 1:18 PM, Christopher Illies wrote:
> >
> > > On Tue, May 15, 2007 at 12:27:10PM +0200, Ernest Sales wrote:
> > > > On Tue, 15 May 2007 09:14:42 +0200, Christopher Illies wrote:
> > > >
> > > > > The locale settings in my .login_conf are ignored:
> > > > >
> > > > > ; cat .login_conf
> > > > > # $FreeBSD: src/share/skel/dot.login_conf,v 1.3
> > > 2001/06/10 17:08:53
> > > > > # ache Exp $
> > > > > #
> > > > > # see login.conf(5)
> > > > > #
> > > > > me:\
> > > > > :charset=UTF-8:\
> > > > > :lang=en_US.UTF-8:
> > > > >
> > > > > ; env | egrep -i 'lang|charset'
> > > > > LANG=en_US.ISO8859-1
> > > > > MM_CHARSET=iso-8859-1
> > > > > ; ls -l .login_conf
> > > > > -rw-r--r--  1 chris  chris  146 May 15 08:26 .login_conf
> > > > > ; uname -r
> > > > > 6.2-STABLE
> [...]
> > > > Never had to deal with ~/.login_conf files, but what
> > > cap_mkdb manpage seems
> > > > to say
> > > > is that you have to concatenate all sources in one run, i.e.
> > > >
> > > > cap_mkdb /etc/login.conf /home/user1/.login.conf
> > > /home/user2/.login.conf ...
> > > >
> > > > HTH
> > > >
> > > > Ernest
> > >
> > > Thanks, unfortunately no success.
> > >
> > > When I concatenate all ~/login_conf files with
> /etc/login.conf I get
> > > the following warning message:
> > > cap_mkdb: ignored duplicate: me
> >
> > So I was mistaken. Try compiling just your ~/login_conf, make sure a
> > ~/login_conf.db file appears.
> >
> > Ernest
>
> Thanks, that has worked!
>
> Before I always used cap_mkdb /etc/login.conf plus all the user's
> $HOME/.login_conf, but just using it on my ~/.login_conf did the
> trick. A ~/.login_conf.db file has appeared.
>
> I feel a bit silly for not having come up with it myself. I guess what
> confused me was that on another user's account the cap_mkdb compiling
> wasn't neccessary, but I don't need to understand that now that it
> works for me.
>
> Thanks again.
>
> Christopher

But you are still curious, aren't you? AFAIK, there are two possible
explanations:

1) There _is_ a .login_conf.db file in the other user's homedir.

2) The other account pertains to a different login class than yours,
which already sets the desired locale and so masquerades the user's
settings being ignored. Dunno if a user can see his own login class. If
you have permissions, can use vipw to find out (if unfamiliar, take a
look to vipw(8) and passwd(5) manpages, notice the 'class' field).

Ernest


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: .login_conf ignored [solved]

2007-05-15 Thread Christopher Illies
On Tue, May 15, 2007 at 04:36:46PM +0200, Ernest Sales wrote:
> On Tuesday, May 15, 2007 1:18 PM, Christopher Illies wrote:
> 
> > On Tue, May 15, 2007 at 12:27:10PM +0200, Ernest Sales wrote:
> > > On Tue, 15 May 2007 09:14:42 +0200, Christopher Illies wrote:
> > >
> > > > The locale settings in my .login_conf are ignored:
> > > >
> > > > ; cat .login_conf
> > > > # $FreeBSD: src/share/skel/dot.login_conf,v 1.3
> > 2001/06/10 17:08:53
> > > > # ache Exp $
> > > > #
> > > > # see login.conf(5)
> > > > #
> > > > me:\
> > > > :charset=UTF-8:\
> > > > :lang=en_US.UTF-8:
> > > >
> > > > ; env | egrep -i 'lang|charset'
> > > > LANG=en_US.ISO8859-1
> > > > MM_CHARSET=iso-8859-1
> > > > ; ls -l .login_conf
> > > > -rw-r--r--  1 chris  chris  146 May 15 08:26 .login_conf
> > > > ; uname -r
> > > > 6.2-STABLE
[...]
> > > Never had to deal with ~/.login_conf files, but what
> > cap_mkdb manpage seems
> > > to say
> > > is that you have to concatenate all sources in one run, i.e.
> > >
> > > cap_mkdb /etc/login.conf /home/user1/.login.conf
> > /home/user2/.login.conf ...
> > >
> > > HTH
> > >
> > > Ernest
> >
> > Thanks, unfortunately no success.
> >
> > When I concatenate all ~/login_conf files with /etc/login.conf I get
> > the following warning message:
> > cap_mkdb: ignored duplicate: me
> 
> So I was mistaken. Try compiling just your ~/login_conf, make sure a
> ~/login_conf.db file appears.
> 
> Ernest

Thanks, that has worked!

Before I always used cap_mkdb /etc/login.conf plus all the user's
$HOME/.login_conf, but just using it on my ~/.login_conf did the
trick. A ~/.login_conf.db file has appeared.

I feel a bit silly for not having come up with it myself. I guess what
confused me was that on another user's account the cap_mkdb compiling
wasn't neccessary, but I don't need to understand that now that it
works for me.

Thanks again.

Christopher

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: .login_conf ignored

2007-05-15 Thread Ernest Sales
On Tuesday, May 15, 2007 1:18 PM, Christopher Illies wrote:

> On Tue, May 15, 2007 at 12:27:10PM +0200, Ernest Sales wrote:
> > On Tue, 15 May 2007 09:14:42 +0200, Christopher Illies wrote:
> >
> > > The locale settings in my .login_conf are ignored:
> > >
> > > ; cat .login_conf
> > > # $FreeBSD: src/share/skel/dot.login_conf,v 1.3
> 2001/06/10 17:08:53
> > > # ache Exp $
> > > #
> > > # see login.conf(5)
> > > #
> > > me:\
> > > :charset=UTF-8:\
> > > :lang=en_US.UTF-8:
> > >
> > > ; env | egrep -i 'lang|charset'
> > > LANG=en_US.ISO8859-1
> > > MM_CHARSET=iso-8859-1
> > > ; ls -l .login_conf
> > > -rw-r--r--  1 chris  chris  146 May 15 08:26 .login_conf
> > > ; uname -r
> > > 6.2-STABLE
> > >
> > > My .login_conf file is not a symlink or world writable
> etc. Also, an
> > > identical .login_conf for another user is applied without
> problems.
> > > What am I missing?
> > >
> > > Christopher
> >
> >
> > Did you run cap_mkdb?
> >
> > >From login.conf manpage:
> >
> >  The default /etc/login.conf shipped with FreeBSD is an
> out of the box
> >  configuration.  Whenever changes to this, or the
> user's ~/.login_conf,
> >  file are made, the modifications will not be picked up until
> > cap_mkdb(1)
> >  is used to compile the file into a database.  This
> database file will
> >  have a .db extension and is accessed through cgetent(3).
> >
> > Never had to deal with ~/.login_conf files, but what
> cap_mkdb manpage seems
> > to say
> > is that you have to concatenate all sources in one run, i.e.
> >
> > cap_mkdb /etc/login.conf /home/user1/.login.conf
> /home/user2/.login.conf ...
> >
> > HTH
> >
> > Ernest
>
> Thanks, unfortunately no success.
>
> When I concatenate all ~/login_conf files with /etc/login.conf I get
> the following warning message:
> cap_mkdb: ignored duplicate: me

So I was mistaken. Try compiling just your ~/login_conf, make sure a
~/login_conf.db file appears.

Ernest


> It did not help with my locale setting, though. Strangely, another
> user account on the same computer works correctly in that respect.
> Also, running cap_mkdb after changing the ~/login_conf of that user is
> not neccessary for the changes to take effect.
>
> This makes me think that there is something wrong with my
> user account. But what?
>
> Christopher



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: .login_conf ignored

2007-05-15 Thread Christopher Illies
On Tue, May 15, 2007 at 12:27:10PM +0200, Ernest Sales wrote:
> On Tue, 15 May 2007 09:14:42 +0200, Christopher Illies wrote:
> 
> > The locale settings in my .login_conf are ignored:
> > 
> > ; cat .login_conf
> > # $FreeBSD: src/share/skel/dot.login_conf,v 1.3 2001/06/10 17:08:53
> > # ache Exp $
> > #
> > # see login.conf(5)
> > #
> > me:\
> > :charset=UTF-8:\
> > :lang=en_US.UTF-8:
> > 
> > ; env | egrep -i 'lang|charset'
> > LANG=en_US.ISO8859-1
> > MM_CHARSET=iso-8859-1
> > ; ls -l .login_conf
> > -rw-r--r--  1 chris  chris  146 May 15 08:26 .login_conf
> > ; uname -r
> > 6.2-STABLE
> > 
> > My .login_conf file is not a symlink or world writable etc. Also, an
> > identical .login_conf for another user is applied without problems.
> > What am I missing?
> > 
> > Christopher
> 
> 
> Did you run cap_mkdb?
> 
> >From login.conf manpage:
> 
>  The default /etc/login.conf shipped with FreeBSD is an out of the box
>  configuration.  Whenever changes to this, or the user's ~/.login_conf,
>  file are made, the modifications will not be picked up until
> cap_mkdb(1)
>  is used to compile the file into a database.  This database file will
>  have a .db extension and is accessed through cgetent(3).
> 
> Never had to deal with ~/.login_conf files, but what cap_mkdb manpage seems
> to say
> is that you have to concatenate all sources in one run, i.e.
> 
> cap_mkdb /etc/login.conf /home/user1/.login.conf /home/user2/.login.conf ...
> 
> HTH
> 
> Ernest

Thanks, unfortunately no success.

When I concatenate all ~/login_conf files with /etc/login.conf I get
the following warning message:
cap_mkdb: ignored duplicate: me

It did not help with my locale setting, though. Strangely, another
user account on the same computer works correctly in that respect.
Also, running cap_mkdb after changing the ~/login_conf of that user is
not neccessary for the changes to take effect.

This makes me think that there is something wrong with my user account. But 
what?

Christopher

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: .login_conf ignored

2007-05-15 Thread Ernest Sales
On Tue, 15 May 2007 09:14:42 +0200, Christopher Illies wrote:

> The locale settings in my .login_conf are ignored:
> 
> ; cat .login_conf
> # $FreeBSD: src/share/skel/dot.login_conf,v 1.3 2001/06/10 17:08:53
> # ache Exp $
> #
> # see login.conf(5)
> #
> me:\
> :charset=UTF-8:\
> :lang=en_US.UTF-8:
> 
> ; env | egrep -i 'lang|charset'
> LANG=en_US.ISO8859-1
> MM_CHARSET=iso-8859-1
> ; ls -l .login_conf
> -rw-r--r--  1 chris  chris  146 May 15 08:26 .login_conf
> ; uname -r
> 6.2-STABLE
> 
> My .login_conf file is not a symlink or world writable etc. Also, an
> identical .login_conf for another user is applied without problems.
> What am I missing?
> 
> Christopher


Did you run cap_mkdb?

>From login.conf manpage:

 The default /etc/login.conf shipped with FreeBSD is an out of the box
 configuration.  Whenever changes to this, or the user's ~/.login_conf,
 file are made, the modifications will not be picked up until
cap_mkdb(1)
 is used to compile the file into a database.  This database file will
 have a .db extension and is accessed through cgetent(3).

Never had to deal with ~/.login_conf files, but what cap_mkdb manpage seems
to say
is that you have to concatenate all sources in one run, i.e.

cap_mkdb /etc/login.conf /home/user1/.login.conf /home/user2/.login.conf ...

HTH

Ernest

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"