If you have cron running, you can add this line to root's crontab by running crontab -e as root:
to have cron run your script on boot.
Beware that cron gives a minimal path. You may want to add . /etc/profile as one of the first lines in your script to ensure it can find all the common commands.
If you want to change permissions on devices, do so with udev's own config files, not manually changing them with a script -- udev is the system that sets the permissions in the first place, and may undo manual changes on a whim. On my system they're in /etc/udev/rules.d/ but YMMV.
Perhaps a udev rule like this:
...matching the name the kernel (not /dev) gives it, assigning it to 'mygroup', and giving it group read-write permissions.
Last edited by Corona688; 02-14-2013 at 01:51 PM..
All,
I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
hi ,
i need to run a script that delete files when i logout as a user other than root user .
I have tried out using .bash_logout but that doesnt seem to work , so any alternative for this to be done.
Thanks in advance,
Harsha (6 Replies)
Dear all
Ihave written a script in Hpux9.0, the ecript is working fine if I run it from root command prompt
But when I am running it thru /etc/profile or /user/.profile and login as a normal user, the owner of the process running the script is the normal user & hence cant run a root privileaged... (7 Replies)
hi
i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help
Thanks (5 Replies)
Hi,
I'm new here. Just started playing around with kernel compilation.
I need a little bit of advice.
I'm trying to do a bash script to automatically compile a kernel package and reboot to that new kernel by default, with fallback to the old kernel.
So far, I'm getting stuck at the part... (0 Replies)
Ok, so, in order to install some dependencies of a program I made, a script has to be run as root. The thing is that I have to copy some things into the home folder of currently logged in user, but the variable $HOME returns '/root' and the $USER returns 'root' :(
Is there any way to see who is... (7 Replies)
Hi,
I have a shell script file which is set to access permission 000. When I login as root (sudo su) and try to run this script, I am getting the Permission denied error. I have read somewhere that root admin user can execute any kind of permission script. Then why this behavior? However, I can... (1 Reply)
So I have a script that runs as a non-root user, lets say the username is 'xymon' .
This script needs to log on to a remote system as a non-root user also and call up a bash script that runs another bash script as root.
in short: user xymon on system A needs to run a file as root user and have... (2 Replies)
Hello I have a script which is working fine so far to generate HTML file. Now i am wondering how do i include a syntax where it can change itself to root user and execute a specific commands as root user.
Please help, Thanks in advance.
-Siddhesh (2 Replies)
Hello Team .
I am working a health check script ( bash) to run on linux server ( RedHat) and requirements are
1. The o/p of script need to be send to two diff files . I am testing with tee command . But I am not successful yet , any recommendations if that is the right approach ?
2. The same... (2 Replies)
Discussion started by: Varja
2 Replies
LEARN ABOUT DEBIAN
crda
CRDA(8) Linux CRDA(8)NAME
crda - send to the kernel a wireless regulatory domain for a given ISO / IEC 3166 alpha2
SYNOPSIS
crda
Description
crda is the Linux wireless central regulatory domain agent. crda is intended to be used by udev scripts and should not be run manually
unless debugging udev scripts. crda is triggered to run by the kernel by sending a udev event upon a new regulatory domain change. Regula-
tory domain changes are triggered by the wireless kernel subsystem (upon initialization and on reception of country IEs), wireless drivers,
or userspace (see iw ). Upon a regulatory domain change the kernel sends a udev change event for the regulatory platform. The kernel
ignores regulatory domains sent to it if it does not expect them. The regulatory domain is read by crda from the regulatory.bin file.
RSA Digital Signature
If built with openssl or gcrypt support crda will have embedded into it an RSA digital signature which will prevent it from reading cor-
rupted or non-authored regulatory.bin files. Authorship is respected by the RSA public key packed into crda. This specific crda package
has been built with an RSA public key from John Linville (the Linux wireless kernel maintainer) and as such will only read regulatory.bin
files signed by him. For further information see the regulatory.bin man page.
UDEV RULE
A udev regulatory rule must be put in place in order to receive and parse udev events from the kernel in order to get udev to call crda
with the passed ISO / IEC 3166 alpha2 country code. An example udev rule which can be used (usually in /lib/udev/rules.d/85-regula-
tory.rules ):
KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/sbin/crda"
Environment variable
Set the COUNTRY environment variable with a specific ISO / IEC 3166 alpha2 country code and then run crda without arguments. This will send
a regulatory domain for that alpha2 to the kernel.
SEE ALSO iw(8)regulatory.bin(5)
http://wireless.kernel.org/en/developers/Regulatory/
crda 23 January 2009 CRDA(8)