# Two questions regarding /etc/login.conf



## Sundex (Nov 29, 2016)

I have loaded FreeBSD 11.0-RELEASE-p1 (GENERIC) #0 r306420

Question #1:  There is a section in the /etc/login.conf in which the comments tell us is for Russian Users Accounts.  The code setting up proper environment variables for Russian users is not commented out.  What would happen - what damage to the system - would occur if I simply commented out this code for Russian users?  

Question #2:  The documentation makes statements to the effect that /etc/login.conf is superceded by a .login_conf file in the home directory.  Does this mean that if a .login_conf file in the home directory exists, that the /etc/login.conf is ignored in its entirety?  The documentation implies that both files are read and the file in the home directory overwrites only those environment variables referred to in the home directory's .login_conf.  Is my understanding correct?

Thanks!


----------



## SirDice (Nov 29, 2016)

Sundex said:


> Question #1: There is a section in the /etc/login.conf in which the comments tell us is for Russian Users Accounts. The code setting up proper environment variables for Russian users is not commented out. What would happen - what damage to the system - would occur if I simply commented out this code for Russian users?


As long as you don't have users assigned to that class, it can be removed. Nothing on the system itself depends on it.



> Question #2: The documentation makes statements to the effect that /etc/login.conf is superceded by a .login_conf file in the home directory. Does this mean that if a .login_conf file in the home directory exists, that the /etc/login.conf is ignored in its entirety?


No.



> The documentation implies that both files are read and the file in the home directory overwrites only those environment variables referred to in the home directory's .login_conf. Is my understanding correct?


Yes.


----------



## Sundex (Nov 29, 2016)

Thank you very much, SirDice.  Your post answers my questions quite well.  I'm considering this issue resolved.


----------



## na5m (Oct 22, 2018)

[Older post bumped]

F*uck me. How much more unnerving could this present situation be? A virgin install of 11.2-REALEASE and an uncommented default within /etc/login.conf  is RUSSIAN?????


```
russian|Russian Users Accounts:\
```


----------



## ShelLuser (Oct 22, 2018)

na5m said:


> How much more unnerving could this present situation be? A virgin install of 11.2-REALEASE and an uncommented default within /etc/login.conf is RUSSIAN?????


What's wrong with the fact that FreeBSD supports multiple languages and character sets? This is no different from Windows being able to support Russian or Asian.

And what's the problem with Russian anyway?


----------



## yuripv (Oct 22, 2018)

na5m said:


> [Older post bumped]
> 
> F*uck me. How much more unnerving could this present situation be? A virgin install of 11.2-REALEASE and an uncommented default within /etc/login.conf  is RUSSIAN?????
> 
> ...



That's awesome, it's like the TV says, they are already there in your default FreeBSD installation.

Seriously though, it was like that forever (check the vcs history on who worked on locale stuff in the tree), it's NOT in the default class (yes, you have to read through entire old thread you bumped unless you were just pretending to be funny).


----------



## na5m (Oct 23, 2018)

Specific languages should be commented out. It should be the end user who decides what to un-comment & use.


----------



## SirDice (Oct 23, 2018)

na5m said:


> Specific languages should be commented out. It should be the end user who decides what to un-comment & use.


They're not enabled. They're not tied to any user account. These entries have been there since FreeBSD 2.2, why is it suddenly a problem?

https://svnweb.freebsd.org/base/stable/2.2/etc/login.conf?revision=50952&view=markup


----------



## ShelLuser (Oct 23, 2018)

na5m said:


> It should be the end user who decides what to un-comment & use.


Which is exactly the case here. Seriously: do your homework before criticizing something, especially if you plan on doing it in such an overly dramatic way.

Alas, the manualpage is your friend here (as always on FreeBSD), please see login.conf(5). This file defines several so called login classes; specific settings which can be defined per user account (or group of user accounts). The _only_ settings here which are automatically being used is 'default'; a login class which gets applied even when a user account is class-less. The only exception to this is the 'root' class which gets automatically applied when a class-less user which has uid 0 logs on.

The rest are merely examples which aren't used. Commented or not doesn't matter: it'll only be used when a user gets assigned with that particularly class. So the only way to use those is to actually assign a user account with that particular class name. And speaking about the russian class, you do realize that all it does (if assigned) is to simply set the proper characterset, language and resort to the default class for everything else? The same class which was already used for everyone else?

It definitely doesn't warn the KGB about your login attempts


----------



## na5m (Oct 23, 2018)

Thanks for all the feedback! I'm actually loving my bare metal FreeBSD install. Nice and clean compared to TrueOS.


----------

