0
votes
1answer
29 views

Script To Logout Root and Login User

I was wondering if there was a way to make a script that logouts of root or takes the automatic root login and logs in a user. This is for security reason so that the user cannot change important ...
1
vote
2answers
59 views

Autorun windows share mount script after login as root

I have looked everywhere for a solution that lets me run CIFS automount script after login with around 20 second delay. What I have tried. Added the script to visudo: rait ALL=(ALL) NOPASSWD: ...
0
votes
1answer
92 views

sudoing my own bash scripting

Okay, so I have my scripts in ~/bin/, and they are added to the path normally. However, when I prefix them with sudo, they are not in the path. I figure this is because they're not in the path for ...
8
votes
1answer
506 views

Script Execution at user logout (non root user)

I am in my university labs running ubuntu 12.10 with unity and I don't have root privilleges. I need to run a script at logout. Is this possible? Note: this is probably a duplicate of this question, ...
1
vote
4answers
495 views

How to Make A Root Script Run Pynotify

I need to run a script as root called root.py. I need to create notifications within the script. I made a separate script specifically for the notifications called notify.py. Here is notify.py: ...
2
votes
1answer
548 views

Root Script Execution at Non-Root User LogIn/LogOut

A script that requires root privileges needs to be executed when a non-root privileged user signs in/out. How do I handle this?
6
votes
3answers
5k views

Run script as root at login (no sudoer user, shell session)

Much like /etc/profile and ~/.profile but ran by root instead of the user is doing login. /etc/rc.local runs after boot but I need running the script before login. The user is not a sudoer one. ...
2
votes
1answer
880 views

How to open a file in gedit with zenity --file-selection as root

I try to open a file in gedit with the file-selection option of zenity. It's very easy to do it for file that i can access in normal mode, but I wanna open too some configuration files (as for exemple ...
3
votes
3answers
4k views

Oracle installation script execution privileges: “oracle is not in the sudoers file”

I'm currently installing Oracle 11g on Ubuntu 10.10 It had been asked to execute some scripts as "root" while installation. I'm doing: oracle@sergio:/u01/app/oraInventory$ sudo sh orainstRoot.sh ...
5
votes
1answer
2k views

How to execute a script as super user first checking the user and getting pass from askpass if not super user

thers a similar question out there How can I determine whether a shell-script runs as root or not? I have the same doubt with different result Is it possible to, within the BASH script prior to ...
15
votes
3answers
6k views

How can a script check if it's being run as root?

I'm writing a simple bash script, but I need it to check whether it's being run as root or not. I know there's probably a very simple way to do that, but I have no idea how. Just to be clear: What's ...