Customized message of the day, we know how to add some content into the file at emoted and that content
will be displayed, that simple text message will be displayed on the screen.
So that is message of the day.
So once again, message of the day is the first message users will see when they log in to the Linux
or any Unix Linux related machine.
And you have to add that simple text message into their file, which is etsi emoted.
Now, what if you wanted to add some kind of commands in it, like when user logs and you wanted to
show user which hostname they logged in, what's the operating system version they have or what kind
of kernel they are running or any commands that you wanted to pass along to the message of the day file
that will show up every time I use of a log in.
Right.
Well, wouldn't that be cool that you put that in one in the entire customized script into one machine
and just copy the word everywhere?
Then it will show up different messages, different hostname, of course.
Right.
Instead of you going into etsi emoted file and modifying the hostname by yourself manually.
So the steps that we will take to customize our message of the day file or the message of the day that
will appear on the screen, the first step is we will create a new file in ETSI profile DOT Demoted.
This is the file we will create.
The file name would be Emoted.
Dot is S.H. Then we will add the desired commands into that file, which is emoted dot S.H. file that
will be modified etsi sfh sahd underscore config which is which is the SAHD process config file.
And we will actually added the line that says print emoted.
Yes.
Two we uncommented and put no.
It means we are telling it.
Don't display the Etsy message of the day any more.
Actually go into the Etsy profile and look for this message of the default.
Then we will have to restart the Demon SAHD, which is the service and to restart a system CTL restored
HD dot service.
These are the steps we will take and this will customize.
This will enable us to customize our message of the day on the screen when the user will login.
All right.
So let's go into our Linux machine and we will try that these steps to modify our screen.
I am logged in as root.
You have to login as rude because you wanted to have them displayed to everybody.
And in order to modify anything that is in ETSI directory, you have to be a root and host.
You are and you are in your own hostname purrfect, which direct you are.
And we are in our home directory, which is slash root, which is the root home directory.
First up, first we will have to create a file in ETSI profile.
DMORT D is the file name.
So first go to let's go into ETSI profile that D and in this directory we will create a file emoted
dot as H now to save some time.
I have already created that file in there already and that is m o t s h.
I use the VEAC Ed to create that file.
Now remember the file has to end with a dot s h because this will tell the operating system that this
is a shell script file which has to be executed.
Now we could v.i. that file and you will see what I have inside of that file.
First, this is a basic shell script that you run as a regular commands and stuff.
So first you put pound bag the bin and Basche, which is the shell, then it is just a pound and then
echo minus E, which is I'm saying that whatever I'm typing right below should be displayed on the screen.
So it's just that simple.
You don't have to if you don't want to put minus E option, you could put Echo followed by all that
stuff that you have underneath anyway.
Then I just picked a hash sign which will display on the screen.
I welcome to Hostname.
Hostname is actually the command itself and we type hostname it actually show me the hostname of my
system.
So I make sure that hostname command is actually surrounded by the tech and take.
Is right on the left side of No one or right below the button, which has the curly tilde, which is
right above the tab.
So start with that tick and with that tick.
Then the next line I have sys, this system is running again.
This is the command and I'm carrying out the file etsi readhead dash Reles again.
This is surrounded by the tick, tick, start, tick.
And then the next line I said Colonel is again this is the command unit minus R and I surrounded with
Teq, just an empty line.
Now this one as you are logged in as who am I, you know this command right from heart.
So you are my command is surrounded by again Teq and it's just simple hash signs, pound signs.
And then at the end, don't forget to close the double coat because we started the double coat right
here.
Right.
So end it with double coat.
Now if you are having problem typing it in or you made a mistake, I have attached a handout in my hand
section.
I have attached a document that has all the information on how you could customize your message of the
day anyway.
So this file has been customized, has been added.
Now, the next thing would we have to do is we have to modify the ETSI, SS H and SS H, underscore
SS HD and scroll config.
So I have to do V.I..
But before I would tell you to modify that, it is very, very sensitive file because if you make a
mistake, it will probably not going to let you login.
So first what I would do is make a copy of it.
Sediuk P slash ss h slash ss hd underscore config.
Then again put the destination azzi ss h ss hd under seal config and I'm going to just put dot Beeac
as in backup.
So now when you do X minus L azzi ss h ss HD config asterisk you'll see both files, the original file
and a backup.
Now you could go in and modify the original file.
So now in case.
Sorry.
So now, in case we make a mistake, we can always report back to back up for hit enter now hit slash
to find our exact syntax if you're looking for and exactly in Texas.
Print emoted.
So slash p r i a. m..
Uppercase o t hit enter and it will take you to exactly.
To the line that you have that you want to modify, get rid of the pound or hash sign and replace it.
Yes.
With Annell, which means do not display that at C emoted file anymore, it will go into at Sepúlveda
and it will display whatever the emoted message.
We have it dear.
Perfect.
Now go ahead and save it.
Colon WQ Bank.
And hit enter now, it has saved that now the last thing that you have to do is restart the SAHD service
so the command to restart a system, CTL restart SAHD dot service.
OK, you got a prompt back.
Perfect.
Now, I will when I have a log in from another terminal, I should see that message that I have created
in ETSI profile Dodie's slash emoted dot as I will see it there.
So I will log in from my PUDI terminal.
So before I do that, I'll find out my IP address.
My IP address has changed.
Now it's one eye to 168, one 29, so I'll open up my PUDI terminal.
My Purdie terminal is Puti T.Y. Pudi in my search and I'll type in one night to 168 129 hit enter.
Log in as myself now.
There you go, see that message, how it came up, it is so cool, so now all that stuff that we have
added in there, now it is customizer.
Welcome to this is my hostname.
Remember, it is actually running the command.
The system is running.
So now this is running the command as Cat was a command there it was Cat ATSE RedHat release.
This is exactly what is displaying right here Colonel, is this is we put it in as you name, minus
R and that is exactly what it is showing right here.
And the last one we added that you are logged in as and the command we had was who am I?
And that is my username.
So anyway, that's how you modify or customize your message of the day file.
So hopefully this will help if you have multiple systems and you want to show that to your users when
they lock in their machine they had logged in.
You could also put in a lot of different commands to check what memory it has, which dysphasia has,
and a whole bunch of stuff that you could put in and put customized scripts as well.