# How could I display a custom version at login prompt



## ruchir15 (Mar 8, 2021)

I have a requirement, to display custom release version (need to change 12.2-Release with a custom version numbering), when a user logged in to the freebsd based custom operating system.

ssh -i xxxxxx.pem root@xx.xxx.xx.xxx
Last login: Mon Mar  8 07:03:16 2021 from xx.xx.xxx.xxx
FreeBSD *12.2-RELEASE* mykernel


I understand, I  could update the kernel config file to get name of custom kernel at login prompt
.i.e. 
	
	



```
vim ../sys/amd64/conf/GENERIC
       Ident = mykernel
```

However if I need to change release version to some custom number how could I do it ?
Something like:

ssh -i xxxxxx.pem root@xx.xxx.xx.xxx
Last login: Mon Mar  8 07:03:16 2021 from xx.xx.xxx.xxx
FreeBSD *5.0.0* mykernel


Kindly guide !!!


----------



## VladiBG (Mar 8, 2021)

For logins via ssh you can edit /etc/sshd_config and modify the Banner.

Note: you need to restart sshd service after you modify to configuration so the new settings can apply. Then you can disable /etc/motd or edit it to your preferences.

sshd banner is displayed before entering the user password
/etc/motd is displayed after successful login


----------



## ruchir15 (Mar 8, 2021)

VladiBG : My banner configuration is already set to None .i.e

Banner none

So I don't think that information is coming from banner.

FreeBSD *12.2-RELEASE* mykernel,

I think it grabs this name from sysctl kern.osrelease.

I am thinking to trying this (update ... /usr/src/sys/conf/newvers.sh and build kernel )
https://forums.freebsd.org/threads/making-a-custom-release-changing-name.6576/)

Will update how it goes !!!


----------



## VladiBG (Mar 8, 2021)

Edit your /etc/motd


----------



## ruchir15 (Mar 8, 2021)

Ohk so you are right !!!  
It was coming from /etc/motd


----------



## SirDice (Mar 8, 2021)

Note that the version in /etc/motd is automatically updated. So you also want to set `update_motd="NO"` in rc.conf. 

If you really want to create a custom version, edit /usr/src/sys/conf/newvers.sh and build from source.


----------



## Deleted member 30996 (Mar 10, 2021)

This is my /etc/motd:


```
FreeBSD 12.2-RELEASE-p4 GENERIC 

                 Unauthorized Access Denied!!!
                           ,          ,
                          /(          )\
                          \\ \\___   / /
                          /- _  `-/  ' !
                          (/\\/ \\ \\   /
                          / /   | `    \
                          O O   ) /    |
                         `-^--'`<     '
                        (_.)  _  )   /
                         `.___/`    /
                           `-----' /
              <----.     __ / __   \\
              <----|====O)))==) \\) /====
              <----'    `--' `.__,' \\
                            |        |
                            \\       /
                      ______( (_  / \\______
                    ,'  ,-----'   |        \\
                    `--{__________)        \\/
```


----------

