Software :: Crontab Script Execution - Different Behavior User-cronfile <-> System-wide Cronfile
Feb 26, 2010
Script iptables_reset.sh
Code:
#!/bin/bash
IPTABLES="$(which iptables)"
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
[code]....
This works if I edit the system-wide crontab in /etc/crontab like this:
Code:
0 12 * * * root /root/iptables/iptables_reset.sh
But it won't work, if i edit roots user-cronfile by using crontab(1):
Code:
crontab -l
# m h dom mon dow command
0 12 * * * /root/iptables/iptables_reset.sh
The log entry is the same for system-wide and user-cronfile:
Code:
/USR/SBIN/CRON[5135]: (root) CMD (/root/iptables/iptables_reset.sh)
I tried different things and found out,if i don't use the "$(which iptables)"substitution in the script, it also works with the user-cronfile.
View 4 Replies
ADVERTISEMENT
Mar 31, 2011
I am unable to use crontab as a user on my system.
Code:
The error is: You (user) are not allowed to access to (crontab) because of pam configuration. I did just recently do an update but I am not sure why this is acting up. I also tried it as root and it also failed with a similar message. I had several crons that ran daily and they are not currently working also. I have selinux Disabled and it has been that way for some time.
View 5 Replies
View Related
Jan 27, 2010
I created a file which in I tried both :
Code:
MAILTO=""
* * * * * /var/www/scripts/script.php >> /dev/null
[code]....
View 5 Replies
View Related
Apr 12, 2011
I have a tiny shell script to rsync files between two servers and remove the source files.
This script works fine, when it has been initiated manually or even when the rsync command is executed on the command line.
But the same script doesn't work, when I try to automate it through crontab.
I am using 'abc' user to execute this rsync, instead of root, as root login to servers are restricted in all of our servers, by us.
As I mentioned earlier, manual execution works like charm!
When this rsync.sh is initiated through crontab, it runs the first command(chown abc.abc ...) perfectly without any issues. But the second line is not at all executed, and there is no log entry i can find at /mnt/xyz/folder/rsync.log.
View 6 Replies
View Related
Sep 14, 2010
Can someone tell me of a sensible fairly standard place to put scripts that a number of users will need on an Ubuntu system?
View 2 Replies
View Related
Apr 27, 2010
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
View 3 Replies
View Related
Sep 9, 2010
I can't seem to find the Unix command that pauses execution until the user presses a key (i.e. the equivalent of "pause" in DOS). Obviously, I need this for programming. I know about all the performance and security issues of system calls, so please don't recommend I used ncurses or some other library instead. I only plan to use it in small programs that I write to test various algorithms and where perfection isn't needed.
View 3 Replies
View Related
Aug 28, 2010
The system wide proxy configuration doesnt work in my workplace . The proxy requires an authentication and export http_proxy and ftp_proxy with the password doesnt work either . For apt I have to make the necessary changes in /etc/apt/apt.conf , for firefox the use system proxy setting doesnt work.I am facing a problem with setting up evolution also .
View 1 Replies
View Related
Sep 16, 2010
Is there a way to adjust how smooth all applications scroll? This is a bit of an aesthetic issue, but also a bit usability as well..
View 2 Replies
View Related
Mar 29, 2010
I wonder where are the Thunar file association settings stored? I have difficulties to find it in my own account, and also system-wide.
View 2 Replies
View Related
Jul 4, 2011
making changes to *.desktop files in /usr/share/applications works for all users, but gets overwritten when those packages are updated. You lose all customizations. Placing the customized ones in~/.local/share/applications works, but you have to do that for all users (pain!). So, what folder do they go in for system wide changes, but safe from updates?
View 2 Replies
View Related
Feb 22, 2010
I'm trying to run a command that will let me run some programs. If I run the command in a terminal, then I can launch the programs from it fine, but not from anywhere except that terminal. This is the command that makes things work:Code:export GTK_RGBA_APPS=allbut:exe:checkgmail:swiftfox:firefoxThis command disables RGBA for the programs listed, which seem to have problems with it. I hoped I could use this command to somehow apply it system wide permanently. I've tried adding it /etc/rc.local and rebooting, but it doesn't work.Is there a way of doing this? Or am I barking up the wrong tree entirely? Is there a better way to disable RGBA for certain programs?
View 3 Replies
View Related
May 10, 2010
I have an RHEL 5 server joined to a windows domain. However I wanted to add variable lines to be executed each time a user logs in. However I succeeded to put them in /etc/bashrc file and it worked like a charm.
But its annoying that everytime the user logs in to the shell remotely it displays the whole variables that were declared. Is there a way how to add them once and not to display the output each time the user logs in?
View 10 Replies
View Related
Jun 23, 2011
I want to set the HTTP_PROXY and HTTPS_PROXY and http_proxy and FTP_PROXY environment variables "somewhere", so all programs that recognise these can find them. I need root to find them for slackpkg and sbopkg, I need users to find them for Dropbox, I need them for cronjobs and scripts and wget.So I want to set these environment variables up somewhere, preferably something in /etc and have them set and accessible for everyone and everything. I am not using KDE or XFCE or any desktop. I need a command line solution.
Where is the best place to put this? I see that some other distros have a /etc/environment and these variables go in there. In Slackware, should I add them as a new file in /etc/profile.d and have them added every time /etc/profile is accessed? Is there a Slackware approved method that I don't know about?
View 6 Replies
View Related
Sep 8, 2010
I have been searching around into /etc/xdg/ and ~/.config and also /skel/.config (for newly created users!) so I can ensure specific applications open filetypes by default.
I would prefer to be able to use a system wide configuration so that i may be able to run a script with each new slackware release that would change application/filetype defaults for all users including existing to our liking (unless they have already preset their own app/defaults in ~/.config).
View 4 Replies
View Related
Aug 27, 2010
I have my company's CA root.crt certificate and I would like to import into openSUSE 11.2 so every application could trust this authority. Is there any instruction for this procedure?
You know, something like you can do in Windows: just click certificate and there is a button "Install certificate"
Where is system certificate store in openSUSE?
View 1 Replies
View Related
Jan 31, 2011
On an older computer of mine using an older CRT monitor, Ubuntu defaults to a monitor refresh rate that causes the screen to constantly flicker and flash, making it nearly unusable. Changing the rate to either 75 Hz or 60 Hz fixes the issue, but changing it through the Monitor settings only affects my user account; part of the loading screen, and the login screen, will continue to flicker and flash. Is there a setting I can adjust somewhere that will set the refresh rate for the entire system, not just my user account?
View 6 Replies
View Related
Jun 17, 2011
I'm trying to set up firefox system-wide to handle ed2k links properly, I'm following amule wiki howto at this page http://wiki.amule.org/index.php/Ed2k_links_handling but it seems a little outdated, I tried to create /usr/share/firefox/greprefs/all.js and /usr/local/share/firefox/greprefs/all.js but I got no results. I also tried to edit /usr/lib/xulrunner-1.9.2.17/greprefs/all.js with no luck. So where should I put ed2k handling strings to apply them system-wide ?
View 1 Replies
View Related
Feb 3, 2010
How can I add a menu entry when I right click my mouse system wide?
View 2 Replies
View Related
Aug 25, 2010
I do a bit of script writing, and part of this involves reading the text aloud and reacting to audio cues. What I'd love to do is set up a method of playing audio files at whim based on a general shortcut. So, say if I pressed <Super>C1, I could play ~/Music/cue1.mp3, <Super>C2 would be ~/Music/cue2.ogg etc.
Currently the closest I've got is using the terminal and a modified .bashrc to play via VLC's ncurses.
Code:
alias cue1="vlc -I ncurses ./Music/cue1.mp3"
Obviously this isn't very near to what I want. Entering a Keyboard Shortcut using the usual methods (xbindkeys, gconf-editor, the KeyShort Preferences GUI) to run
Code:
vlc -I ncurses ./Music/cue1.mp
doesn't play anything. Is it possible to launch these kinds of commands as shortcuts, or am I hoping for too much? My Google trawls have been pretty fruitless. I'm running Lucid, btw.
View 2 Replies
View Related
Sep 30, 2009
how to do this via command-line? I cant seem to get it to change I'm in a chroot and need to know how-to via console?
View 4 Replies
View Related
May 7, 2010
The default output audio port Ubuntu doesn't work on my system. It should be "Analog Mono Output/Amplifier", instead of "Analog Output/Amplifier". I can easily change that in sound preferences, just by choosing the right port in the "Output" tab, or by issuing the following command:
Code: pacmd 'set-sink-port' 'alsa_output.pci-0000_00_1f.5.analog-stereo analog-output-mono;output-amplifier-on' The problem is both solutions apply only to a single account, while I would like to change it system-wide, so it applies to all accounts on the system (there are more then 100 accounts - it's a set up for a school).I'm using Ubuntu 10.04.
View 1 Replies
View Related
Mar 3, 2011
Is there a way to imitate OS X behavior of opening applications in Linux?
For example: Assume that I already have Firefox open. In OS X it is very easy to open that window from console (it is the default, using open -a firefox).
View 2 Replies
View Related
Feb 5, 2010
How can I import in OS level (system wide) the CAcert root certificate and the relevant class 3?
View 3 Replies
View Related
Apr 26, 2010
We're in the final process of building a home, and I had them setup a wiring box where all the coax and cat5 terminates into one closet, which will also house my server. Once we get moved in I'd also like to add speakers in each room to have house-wide music, and ideally I'd like the audio to also run into this box with the master input coming from the server as well.My thought was to setup the server with some basic desktop manager like Fluxbox and use that to drive audio throughout the house, whether it be Pandora, Sirius Radio, or whatever. Since the server will be headless I'll need it setup so we can remote into it from our laptops, but I wasn't sure if VNC or some other RDP variant would work. Ideally we'll need to access a unified desktop so traditional terminal services where each users gets their own desktop might not be ideal
View 1 Replies
View Related
Mar 20, 2011
i know the subject is hard to understand but i did my best with it. the problem: i have 2 HDs on my Ubuntu OS, the first is 1TB and the other is 500GB, i want to do a backup with rsync from my 1TB HDs (in with the Ubuntu is on it) to the 500GB.
on the 500GB i have a partition called Backup. what i did: i have created a user crontab that dose two things: 1. mount the Backup partition from the 500GB to a folder called /~/Backup on my home directory which is on the 1TB HD.
2. i wrote the proper rsync command for the backup to go.
[Code]...
View 9 Replies
View Related
Jun 14, 2010
How do I change the screen blanking behavior on Linux virtual terminals?
For example, if I switch to a VT from X, login, and leave the system alone for 5 minutes or so, the screen will blank like a screensaver. It comes back with any keypress, like a screensaver.
Mostly I just want to change the timeout, but I'm also interested in other settings.
If it helps, one of my systems is running Ubuntu 10.04 with the stock graphics drivers. fbset shows the console using the radeondrmfb framebuffer device.
View 2 Replies
View Related
Jun 11, 2009
I am practicing on "crontab" and am able to get system status in time but I want to shut my system through crontab.#15 12 11 06 thu init 0
View 1 Replies
View Related
Nov 16, 2009
Is there a way to view all the crontab files, owned by root, users, and other system accounts, that exist on a system simultaneously rather than having to go the individual accounts? The distribution in question here is the Debian 4.0 release.
View 2 Replies
View Related
Jun 23, 2011
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
View 4 Replies
View Related