CentOS 5 :: Crontab - As Root - Cannot Pop-up Message Windows
Apr 15, 2009
When I setup crontab as a local user (settings shown below), then it can pop-up a xmessage windows * * * * * DISPLAY=:0.0 /usr/bin/xmessage -center "warning message here" but when I switch to root, and setup the same things in crontab, why it cannot pop-up a xmessage windows? Any special limitation for root to use crontab?
I've just discovered that crontab is creating a new file in the root directory every time it executes a cronjob, and it doesn't erase over the old file so there are thousands of files in the root directory, they have the same name as the script file (appended with a numeral) but are all blank.here is what one of the cronjob's looks like[URL]
I have a question about using crontab with /etc/crontab...
I had a cron job that I needed to run as root. At the time I thought that sticking it in /etc/crontab would be a good idea. However, I used the crontab command to edit /etc/crontab, which I guess is not standard procedure? Specifically, I configured /etc/crontab as my local user's crontab (i.e. sudo crontab /etc/crontab) then added my cron job as I would a local user crontab (i.e. sudo crontab -e).
Originally, my cron job looked like this:
30 * * * * root /my/batch/script &> /dev/null
After adding the new cron job I started seeing errors. Something to the effect of "can't find command root" or something similar. So I removed the 'root' user definition from the cron job and the job started running fine. However, because this is /etc/crontab, there are other system related cron jobs that have been defined to run under the root account (e.g. "17 * * * * root cd / && run-parts --report /etc/cron.hourly" runs as root, etc.). So these pre-existing system cron jobs, which up until now have been running smoothly, are now generating "can't find command root" errors. But I think that the system cron jobs _are_ successfully being run someplace because logrotate seems to be working.
So what I _think_ is happening is that /etc/crontab is being run twice: once as the system crontab, and once as my sudoed local user's crontab. When I run crontab -l I see nothing, but when I run sudo crontab -l I can see the contents of /etc/crontab. I am reluctant to delete my sudoed local user's crontab, because then in the process I would be deleting the system crontab, and I do not know how I should restore the system crontab's contents. (I am still not sure as to the most appropriate way to edit the system crontab).
How can I get out of this mess? I want /etc/crontab to go back to the way it was before--running _once_ as the system crontab. As for my new cron job, I'm willing to reconfigure it anywhere so long as I am still able to run it as root. Any ideas? (I am using Ubuntu 8.04 Server LTE)
I can use Ubuntu from my flash drive, but I want to install it in a partition alongside windows. When I try to do this, I come to an 'allocate drive space' window, but whatever I do I get the error message: 'No root file system is defined. Please correct this from the partitioning menu.' I just don't know what this means, or what to do next. I'm loathe to ditch windows, and I don't want to have to use a flashdrive all the time.
I am using Linux 64 bit Redhat Linux. I am trying to setup simple crontab as follow...1. Edited crontab file using crontab -e2. Listed the file once to verify it using crontab -l. This will display as.. 18 5 * * 2-3 ksh $HOME/testScript.sh > $HOME/testscript.out3. Logged in a root and restarted cron deamon using "/etc/init.d/crond restart"As per my understanding now my testScript should start running at 5:18 am Thuesday
I am setting my cron to work. I am in the roo account/ So first I type as vi crontab -e. Then it ask me type "visual" for normal mode and do that then I type the following as below 1 * * * * root usr/local/testClient/runClient.sh>/usr/local/testClient/cron1.log and press esc type wq. Then I restart the cron service /etc/init.d/crond stop and /etc/init.d/crond start. Lastly when I type crontab -l it tells me no crontab for root.
I have set up my crontab and whilst Im logged in and it works (It runs my shell script), however when Im not logged in, the script does not run. Initially I set the time/date to 0 0 * * * (Midnight every day), as this did not work, I tested it with to 0 * * * * (every hour) whilst logged in and the script starts.
I use crontab -e to set it up under the root account..Im sure you dont have to be logged in for it to run?, but maybe im missing a step or just overdosing on Linux and need a holiday:-)
I have installed vnc-server on my CentOS 5.6 virtual machine. I can connect to it with a java web browser so it seems to be working. However, I get the following error message when I start, stop or restart the vnc-server process. Quote: Starting VNC server: 1:ken xauth: timeout in locking authority file /root/.xauthkk661q
I am trying to run rsnapshot from cron via root's crontab file (crontab -e). If I run rsnapshot from the command line with sudo it works perfectly, however, if I run it from cron:
Code: * * * * * /usr/bin/rsnapshot hourly >/tmp/crontab.out 2>/tmp/crontab.err This does not work. The crontab.err file shows:
I have been having trouble setting up a daily backup script with cron. It would basically never worked. Searched the net for answers but didn't find anything. I finally figured it out !! When root crontab is edited the execute flag is removed from #/var/spool/cron/crontabs/root. I change it with #chmod a+x /var/spool/cron/crontabs/root and all is good.
is it possible disabling a crontab job without deleting the crontab description entry (by crontab -e)?I could also accept to change the entry itself. Now it's:0 0 * * 0-6 /home/me/cron/script.csh
I'm setting up a new server and have edited the crontab to a run a script but nothing is happening, is there anything I need to setup to get the crontab working?
I have installed an application manager(monitoring application) on my linux server. Now, i need to have backup schedule for my application. The application itself has executive file to backup database.But when i put this file in my crontab to schedule the backup program it wont run!50 09 * * * root /opt/ME/AppManager9/bin/BackupMysqlDB.sh
You know the system mail message that Pat leaves root welcoming them to Slackware and other things.here are some good things in there. I wanted to know how I could copy that so other user on the system could read it in a text file or something
I'm trying to install CentOS 5.5 on an old Pentium 4 desktop PC I have, which is not being used for much other than being a MTA, and I want to migrate this functionality onto the CentOS platform for stability (Windows is a perpetual nightmare. I partitioned a spare 20GB to experiment with, and I want to install CentOS into here to play around with first so I can move my files around between Windows and CentOS, until I'm happy all of the stuff is gone, then I can scrub the Windows partition and claim the space for CentOS.
So, I've downloaded and burned the DVD and tried to install. I start the install with no args from the main install menu, and the process goes through some probing and then comes up with the "Welcome to CentOS" menu. I go through this, and then it tries to start X Server. It fails, and falls back to text mode. I get the "Welcome to CentOS" screen again, and then proceed through it. I set my keyboard layout to UK, then this message comes up at the bottom of the screen:
"_X11TransSocketINETConnect() can't get address for localhost:6001: Temporary failure in name resolution"
then on the next line: "Cannot open display :1" If I force the install to text, by typing "linux text" at the first menu, I get about the same way through, but the install just hangs doing nothing, and no disc access to the install disc.
I was trying to edit a file requiring root permissions, so I used sudo. I typed the root password and it failed. This happened three times, and the process was ended. I then logged in as root (su) and was able to navigate to the file and make changes as root. Am I missing something? How would I edit the sudoers file such that this password would work? Or is there another way to log in to the sudo group to make these changes? How do I set sudo passwords?
I am getting an error message at step 5 of 8 in the installation process. I am using Ubuntu LiveCD. The caption of the error is 'No root file system' and the message itself says 'No root file system is defined.Please correct this from the partitioning menu.' I enclose a screenshot of this. I had also problems with booting Ubuntu and Windows after installing Ubuntu to an external hard disk so I probably have to also create a new boot menu (may be it is differently called, 'grub' possibly, I am not really sure).
I am trying to Upgrade from Fedora 12 to Fedora 13 using Preupgrade. My system downloads the the Upgrade and tries to install it but returns a message "Root of the previous system not found". I would really like to fix this problem but dont know how.
I have recently set up an ubuntu installation on an old PC. After some fiddling with both it, and the windows 7 machine, I have managed to share all of my drives. However, when attempting to access them from ubuntu, only 2 of the 4 hard disk shares will mount, with the other 2 failing with a Unable to mount location, failed to mount windows share error message.
I have a single harddisk partitioned with Ubuntu Maverick and Windows 7 installations. I installed Windows first and then Ubuntu, after resizing partitions and adding a new one for Ubuntu. Win7 did not appear in the Grub2 boot menu. I added it (sda3), but on rebooting, I get the message "BOOTMGR is missing/Press Ctrl+Alt_Del to restart".
I understand that Win7 might have put its boot manager in another partition, and sda1 had FAT. I added sda1 as another grub2 entry, but when I try that, I get the error message "Windows Boot Manager/ Windows failed to start. A recent hardware or software change might be the cause... Status 0xc0000225/ Info: The boot selection failed because a required device is inaccessible." Attached are fdisk and parted outputs; and the grub2 files I created. How do I get Windows 7 to boot up?
I am in the process of settign up a home server under FC14. The installation recognized both NICs, one as Intel Gigabit and the other as a Realtek Semiconductor as it should be. But when trying to start eth0 (Realtek) I get the following error message:
[root@theraugafamily network-scripts]# ifup eth0 Active connection state: activating Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/1 ** (process:2296): WARNING **: _nm_object_get_property: Error getting 'State' for /org/freedesktop/NetworkManager/ActiveConnection/1: (19) Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist
state: unknown Error: Connection activation failed. Some more ifo the this NIC as it is of special type.It is a Viking PCI ADSL2+ Modem Card. I am quoting form the description "Being a gully integrated card, no external plug packs are required and cabling is simplified to just an ADSL line connection. The need to purchase an extra ethernet card is also eliminated, as yjis features is build into the card. The onboard Ethernet controller (RTL8139) makes the modem appear to the OS as a standard network card. Thus the Viking can be used with almost any modern O/S without the need for special drivers. This includes Windows, Linux, Solaris, xBSD, etc.." setting ACPI=off in GRUB.conf does not fix the issue
Started slackpkg upgrade-up and went to bed. Woke up to find the power had gone out during the night. The computer booted up, but displayed a message that said something to the effect of, "Error occurred during root file system check. You will be given the option of doing maintenance......"I can get to a command prompt, but regardless of what I do a message pops saying it can't find libblkid.so.1