Sponsored Content
Full Discussion: cron task not working
Top Forums Shell Programming and Scripting cron task not working Post 54223 by jim mcnamara on Thursday 5th of August 2004 04:30:38 PM
Old 08-05-2004
try:
Code:
echo `date "+20%y-%m-%d% %H:%M:%S"` `/usr/sbin/ifconfig en0 | grep "inet " | awk '{print $2}'` >> /tmp/mysqlip.txt 2>path/to/errorfile.log

add the path to ifconfig, and then add the redirection to a log
file to see if you have any other problems. You may also have to specify paths for grep, etc - any command that is not a shell built-in.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cron not working

Cron does not seem to work with this crontab. Any ideas? # run-parts # commands to execute every hour 01 * * * * root run-parts /etc/cron.hourly # commands to execute every day 02 4 * * * root run-parts /etc/cron.daily # commands to execute every week 22 4 * * 0 root run-parts... (1 Reply)
Discussion started by: DaleCabell
1 Replies

2. UNIX for Dummies Questions & Answers

Cron not working?

Hello I have a mac os x server machine that I have setup a cron to run a php file using wget and cron doesn't seem to work. I have setup cron on other mac's before and they have all worked. Also I know wget works because I have tested it. Is there anything else I should try? I do crontab -e and... (5 Replies)
Discussion started by: christo16
5 Replies

3. UNIX for Dummies Questions & Answers

Cron not working

I created a file in /u01/oradata directory as cronjb.ksh which contains following script 30 12 * * * /export/home/oracle/u01/oradata/rman.ksh '/export/home/oracle' is my root directory. I then moved cronjb.ksh file to my '/export/home/oracle' directory. i typed crontab cronjb.ksh. However my... (1 Reply)
Discussion started by: manna
1 Replies

4. Shell Programming and Scripting

comment and Uncomment single task out of multiple task

I have a file contains TASK gsnmpproxy { CommandLine = $SMCHOME/bin/gsnmpProxy.exe } TASK gsnmpdbgui { CommandLine = $SMCHOME/bin/gsnmpdbgui.exe I would like to comment and than uncomment specific task eg TASK gsnmpproxy Pls suggest how to do in shell script (9 Replies)
Discussion started by: madhusmita
9 Replies

5. Solaris

cron not working.

I have a script monitor.sh the path is /netmon/bin/monitor.sh when i run this script as sh /netmon/bin/monitor.sh it runs completely fine. but when i include it in crontab , it does not run my cron entry is 0,5,10,15,20,25,30,35,40,45,50,55 * * * *... (11 Replies)
Discussion started by: asalman.qazi
11 Replies

6. Red Hat

Cron task output is 0, script output is OK

I have the following cron task set to run every 15 minutes to ascertain how many users are in the system and append the result to the log. /home/pronto/cus/whoisinc >> /home/pronto/cus/whoisin.log This is the whoisinc script date +"%d-%m-%Y,%k:%M,Pronto Users,`prowho -s | grep -v... (1 Reply)
Discussion started by: scottm
1 Replies

7. Ubuntu

cron-tab issue(Task scheduling)

I used the cron-tab to run the rails's server 24 hours for my application by issuing the following command in terminal crontab -3(To open the cron-tab terminal) and then * * * * * OSV/OpenStreetView/script/server Similarly i tried to run server for the django application by issuing the... (2 Replies)
Discussion started by: amritpalpathak
2 Replies

8. Shell Programming and Scripting

Script is not working from cron while working manually

Hello, I am facing a very strange problem when I run my script manuallu ./Fetchcode which is using to connect with MKS integrity from linux end it workks fine but when I run it from cron it doesn't work.Can someone help me 1) How could I check my script when it is running from cron like... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies

9. Shell Programming and Scripting

Script not working in cron but working fine manually

Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered. The script is as follow: #!/bin/sh for file in file_1.txt file_2.txt file_3.txt do awk '{ print "0" }' $file > tmp.tmp mv tmp.tmp $file done And the cron... (2 Replies)
Discussion started by: jasperux
2 Replies

10. SuSE

Cron not working

Hi, It is SLES 10.3 VM. Suddenly cron stopped working on this and I am not able to figure out, where it is failing. It is not running with even root. I gave a simple job of redirection of 'date' command, that also doesn't work. Can somebody help me to fix this ? vmprdt23:~ # ps -ef | grep -i... (4 Replies)
Discussion started by: solaris_1977
4 Replies
ifconfig_selinux(8)					      SELinux Policy ifconfig					       ifconfig_selinux(8)

NAME
ifconfig_selinux - Security Enhanced Linux Policy for the ifconfig processes DESCRIPTION
Security-Enhanced Linux secures the ifconfig processes via flexible mandatory access control. The ifconfig processes execute with the ifconfig_t SELinux type. You can check if you have these processes running by executing the ps com- mand with the -Z qualifier. For example: ps -eZ | grep ifconfig_t ENTRYPOINTS
The ifconfig_t SELinux type can be entered via the ifconfig_exec_t file type. The default entrypoint paths for the ifconfig_t domain are the following: /bin/ip, /sbin/ip, /sbin/tc, /usr/bin/ip, /usr/sbin/ip, /usr/sbin/tc, /sbin/ethtool, /sbin/ifconfig, /sbin/iwconfig, /sbin/mii-tool, /usr/sbin/ethtool, /usr/sbin/ifconfig, /usr/sbin/iwconfig, /usr/sbin/mii-tool, /sbin/ipx_configure, /sbin/ipx_interface, /sbin/ipx_inter- nal_net, /usr/sbin/ipx_configure, /usr/sbin/ipx_interface, /usr/sbin/ipx_internal_net PROCESS TYPES
SELinux defines process types (domains) for each process running on the system You can see the context of a process using the -Z option to ps Policy governs the access confined processes have to files. SELinux ifconfig policy is very flexible allowing users to setup their ifcon- fig processes in as secure a method as possible. The following process types are defined for ifconfig: ifconfig_t Note: semanage permissive -a ifconfig_t can be used to make the process type ifconfig_t permissive. SELinux does not deny access to permis- sive process types, but the AVC (SELinux denials) messages are still generated. BOOLEANS
SELinux policy is customizable based on least access required. ifconfig policy is extremely flexible and has several booleans that allow you to manipulate the policy and run ifconfig with the tightest access possible. If you want to allow users to resolve user passwd entries directly from ldap rather then using a sssd server, you must turn on the authlo- gin_nsswitch_use_ldap boolean. Disabled by default. setsebool -P authlogin_nsswitch_use_ldap 1 If you want to allow all daemons the ability to read/write terminals, you must turn on the daemons_use_tty boolean. Disabled by default. setsebool -P daemons_use_tty 1 If you want to deny any process from ptracing or debugging any other processes, you must turn on the deny_ptrace boolean. Enabled by default. setsebool -P deny_ptrace 1 If you want to allow all domains to use other domains file descriptors, you must turn on the domain_fd_use boolean. Enabled by default. setsebool -P domain_fd_use 1 If you want to allow all domains to have the kernel load modules, you must turn on the domain_kernel_load_modules boolean. Disabled by default. setsebool -P domain_kernel_load_modules 1 If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default. setsebool -P fips_mode 1 If you want to enable reading of urandom for all domains, you must turn on the global_ssp boolean. Disabled by default. setsebool -P global_ssp 1 If you want to allow confined applications to run with kerberos, you must turn on the kerberos_enabled boolean. Enabled by default. setsebool -P kerberos_enabled 1 If you want to allow system to run with NIS, you must turn on the nis_enabled boolean. Disabled by default. setsebool -P nis_enabled 1 If you want to allow confined applications to use nscd shared memory, you must turn on the nscd_use_shm boolean. Disabled by default. setsebool -P nscd_use_shm 1 NSSWITCH DOMAIN
If you want to allow users to resolve user passwd entries directly from ldap rather then using a sssd server for the ifconfig_t, you must turn on the authlogin_nsswitch_use_ldap boolean. setsebool -P authlogin_nsswitch_use_ldap 1 If you want to allow confined applications to run with kerberos for the ifconfig_t, you must turn on the kerberos_enabled boolean. setsebool -P kerberos_enabled 1 MANAGED FILES
The SELinux process type ifconfig_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions. ifconfig_var_run_t /var/run/netns(/.*)? ipsec_var_run_t /var/racoon(/.*)? /var/run/pluto(/.*)? /var/run/charon.* /var/run/charon.ctl /var/run/racoon.pid FILE CONTEXTS
SELinux requires files to have an extended attribute to define the file type. You can see the context of a file using the -Z option to ls Policy governs the access confined processes have to these files. SELinux ifconfig policy is very flexible allowing users to setup their ifconfig processes in as secure a method as possible. STANDARD FILE CONTEXT SELinux defines the file context types for the ifconfig, if you wanted to store files with these types in a diffent paths, you need to exe- cute the semanage command to sepecify alternate labeling and then use restorecon to put the labels on disk. semanage fcontext -a -t ifconfig_exec_t '/srv/ifconfig/content(/.*)?' restorecon -R -v /srv/myifconfig_content Note: SELinux often uses regular expressions to specify labels that match multiple files. The following file types are defined for ifconfig: ifconfig_exec_t - Set files with the ifconfig_exec_t type, if you want to transition an executable to the ifconfig_t domain. Paths: /bin/ip, /sbin/ip, /sbin/tc, /usr/bin/ip, /usr/sbin/ip, /usr/sbin/tc, /sbin/ethtool, /sbin/ifconfig, /sbin/iwconfig, /sbin/mii-tool, /usr/sbin/ethtool, /usr/sbin/ifconfig, /usr/sbin/iwconfig, /usr/sbin/mii-tool, /sbin/ipx_configure, /sbin/ipx_interface, /sbin/ipx_internal_net, /usr/sbin/ipx_configure, /usr/sbin/ipx_interface, /usr/sbin/ipx_internal_net ifconfig_var_run_t - Set files with the ifconfig_var_run_t type, if you want to store the ifconfig files under the /run or /var/run directory. Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context you need to use the semanage fcontext command. This will modify the SELinux labeling database. You will need to use restorecon to apply the labels. COMMANDS
semanage fcontext can also be used to manipulate default file context mappings. semanage permissive can also be used to manipulate whether or not a process type is permissive. semanage module can also be used to enable/disable/install/remove policy modules. semanage boolean can also be used to manipulate the booleans system-config-selinux is a GUI tool available to customize SELinux policy settings. AUTHOR
This manual page was auto-generated using sepolicy manpage . SEE ALSO
selinux(8), ifconfig(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) , setsebool(8) ifconfig 14-06-10 ifconfig_selinux(8)
All times are GMT -4. The time now is 07:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy