General :: Put A Script Into The Motd File?
Feb 13, 2010how i can put an scipt into the motd file? For example if i want to know how many users are logged on while i log in.
View 1 Replieshow i can put an scipt into the motd file? For example if i want to know how many users are logged on while i log in.
View 1 RepliesI know this is somewhat lame, but I remember back in college the MOTD on some of the systems was a random quote. I always wanted to do that. It seemed really trivial, but still neat and clever.
I searched a bit and don't see anything built-in for CentOS, so I was considering writing a Perl script to parse the RSS feed from a quotes site, then update /etc/motd with a random quote from the feed. This would nearly guarantee I could have this on any distro with identical results. Does anyone know of anything that already exists? Is anyone interested in using a script that I write to have the MOTD updated with random quotes themselves, or am I the only one? I'm perfectly willing to share the result when I'm finished.
I want to display motd after entering username but before entering password. Is it possible?
View 8 Replies View Relatedive done countless google searches and forum searches with all the same results all the time. Is there anyone who can tell me what file to edit in order to display? Ive tried editing the /etc/motd file and no luck. I tried alot of other stuff too.
View 10 Replies View Related[On Ubuntu 10.10 64-bit]
I have been trying to get rid of the boring motd when ssh-ing into the machine. I have sudo vim-ed the /etc/motd file to no avail.
Even if I add a motd.tail tail file with my content. I still get the boring and verbose:
Quote:
Linux barney 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1 14:39:03 UTC 2011 x86_64 GNU/Linux
Ubuntu 10.10
Welcome to Ubuntu! * Documentation: [URL]
How do I get rid of this?
I am setting a customized MOTD, however after 24 hrs, it reverts back to the default MOTD.
I noticed that it is a softlink
Code:
cmmiller@ladytron:/etc$ ls -al | grep motd
lrwxrwxrwx 1 root root 13 2009-07-05 10:47 motd -> /var/run/motd
cmmiller@ladytron:/etc$
And I'm making the change to /var/run/motd, however it keeps changing.
I applied some changed to the MOTD in /etc/update-motd (including removing the canonical mention in ./python2.6/dist-packages/landscape/sysinfo/landscapelink.py). After updating the system I found that all my changes had been deleted without any warning. Is there a way around this nonsense?
View 2 Replies View RelatedI am not sure what happened here. I have 10.04.1 and was able to run a command "update-motd". I wasn't able to get it to dynamically create a new motd. My hope was to have it recreate it once a day and email me the MOTD from the server.
In trying to get it to do this, I did a "apt-get install update-motd" in which it proceeded to do this, but then after the installation, I get:
"update-motd: command not found".
What did I do, how can I manually update/create the /var/run/motd file?
I am trying to change the motd "message of the day" on my Ubuntu server 10.10,
But when i do sudo vi /etc/motd...
i can change the text here, but as soon as I save and exit this file. It changes itself straight back.
I want to automate my System-installation. So i try to make a Script that will generate the /etc/motd. Now i have the Problem that the script has some variables and after the "Hostname, OS, HW, IP" the "stars" are anyware, but not there they should. The most problem is the $OS this string can verry long or verry short be. Fedora release 12 (Constantine) or RedHat 5.4 i can do that after the variables place the "stars" on the write position?
Script
Code:
#!/bin/bash
[code]....
I've just installed ubuntu 10.04 and the message text that shows when you ssh in shows the disk usage of /home.How do I get it to show the disk usage of the entire root / instead? (like it used to on some older version of ubuntu)
View 1 Replies View RelatedI'm running Ubuntu Server 10.10 and noticed that every time I log into the server via ssh it gives details that i don't necessarily want it to show.
Code:
Linux zeus 2.6.35-22-generic-pae #33-Ubuntu SMP Sun Sep 19 22:14:14 UTC 2010 i686 GNU/Linux
Ubuntu 10.10
[code]....
When i tried to log in, i get blank screen on the login page, even the src/configtest.php This can be solved by reverting whatever was edited for the motd option to its original paramater. anyone experienced this before and found a solution? The only reason for me to use php 5.2 is to install roundcube alongside squirrelmail. Using: centos 5.5 32-bit, squirrelmail 1.4.8, php 5.2
View 1 Replies View Relatedi have generated .exe file from C file (ie filename.c ) after compiling in linux machine with -O option. I wish to know about how to run that .exe file when linux system starts up ?
View 3 Replies View RelatedI want to convert fdf file to xsf file or xyz file on ubuntu 9.10_32 bit .
View 5 Replies View RelatedI work for a company that makes portable devices running Linux and I was recently asked to make the underlying file system read-only for "security" purposes. Since the distribution is based on LinuxFromScratch, I know that very little writing happens at run time. So, even if the device runs on a usb flash device, I doubt that putting the root file system RO will be that beneficial. I am actually more concerned about a process actually breaking because it cannot open a file in RW mode than a process going rogue and filling the root file system with log files, etc. I'd really like to ear what kind of advantages disadvantages there really is with read-only file-systems.
View 6 Replies View RelatedCan't log into my XFCE desktop like I normaly do. all the sudden I get notified that my xsession lasted less then 10 secondsLooking at the error I can see this:
Unable to access file /home/username/.iceauthority: No such file or directory
Using failsafe I can start a terminal. From terminal I tried to start X
Code: sudo startx Result: Running on desplay:0
So I tried to run this;
Code: sudo startxfce4 And I get up a graphical desktop.
So this is not a critical situation as I easily can use this method to log on, but as there has been something causing this I would like to be able to resolve this nonetheless. Btw it is not the old chmod trick in play here, cause my .iceauthority file is gone alltogheter.
I'm currently stuck at 6.13 GMP-5.0.0 of the LFS installation. After running make, I receive the following:
error while loading shared libraries: libbfd-2.20.so: cannot open shared object file: No such file or directory
make[2]: *** [libmpn.la] Error 127
make[2]: Leaving directory `/sources/gmp-5.0.0/mpn'
[code]....
I have just been bothered by a fairly small issue for some time now. I am trying to search (using find -name) for some .jpg files recursively. This is a Redhat environment with bash.
I get this job done though I need to copy ALL of them and put them in a separate folder BUT I also need to keep the order intact after copying.
For e.g - If I get a JPG file under /home/usr/new/1/ then the destination also needs to be /test/old/new/1/.
At the moment, I am simply putting all files under /test/old/ and I can't somehow get the later /new/1/ folder path created under /test/old/
I understand this could well be done using while OR if else loop, though if someone can just guide me with a hint, I would be really grateful.
I will complete the rest of the steps and was asking here since I am still not comfortable with the shell/bash scripts yet and planning to be really good at it over the next couple of months.
I need to get the modified date on a file in linux to use in a script.I tried using 'ls -l' on the file, but this caused problems when the date turned from a single digit into a double. The reason for the problem was because I was parsing the result string on spaces.How can I get the date of the last time a file was modified so I can use it in a script? For example, if a file was modified on 1/11/2010, I need the 11.
View 2 Replies View RelatedHow can I check and set who can view or open a given folder or file?
View 1 Replies View RelatedI am using xubuntu and there are a few types of files on website that instead of downloading and saving and then opening with emacs, I would rather when the radio button choice comes up say open with emacs. I am using xubuntu with xfce, and there is no line for a command to be entered as some ubuntu editions have. In the choice of changing the opening program from mousepad to something else, it says search and allows to navigate to find a program, but I cant find emacs anywhere not in etc/ or elsewhere. So where is its executable to direct the program chooser to?
View 1 Replies View RelatedI have a Linux (Kubuntu) system with a large (~20Gb) file which I would like to mess with. Specifically, I want to copy the entire contents of another large file (~12Gb) to the middle of this file, and keep the bits of the file which are not overwritten.This is what I want to happen, with the text between the pipes representing file contents:Before:
outfile: |abcdefghijklmnopqrstuvwxyz|
infile: |123456789|
After:
[code]....
How can I read .gz file direct on shell/terminal without decompressing the file?
satimis
I had a situation in which the the path of the file to be copied is written in other file and I had to copy it using shell script..I can use cp $(cat /home/robert/location.txt) /media/sda1 on normal linux shell...But I am using buildroot script where $(cat /home/robert/location.txt) evaluate to nothing..is just blank..
View 1 Replies View RelatedI'm trying to install PCSX2 (PS2 emulator) and I get the following error: ./pcsx2: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory
I've followed the instructions here http://pcsx2.net/downloads.php and believe I have all the dependencies installed. My system has the following file:
/usr/lib/libgtk-x11-2.0.so.0
I need a shell script that will add the users name and date to a file when the user has modified the file, these files are within a group and only accessible to this group. But we need a way for people in the group to know who and when the file was last modified.
View 1 Replies View RelatedI was doing a tutorial on scripting in bash. I saved my file on the desktop and I cannot seem to get to that file to execute it. Here is what I have been using:
I try cd Desktop says that there is no such directory.
I tried /home/me/Desktop same thing.
i am trying to convert a binary file in to ASCII using shell script. this file contains multiple types of data like string, number, bcd, etc.
View 5 Replies View RelatedMany folders within a subdirectory some of which have lots of data in and some of which have only one specific file called produkt.fil inside.I need a command to find and delete those folders that contain ONLY the file produkt.fil - if other files exist (doesnt matter what they are) then they should be left alone. Note: produkt.fil exists in all of the folders always.
View 5 Replies View Related