A sample script can be as below: #!/bin/bash sudo su ls /root When using ./test.sh as the normal user, instead run ls as super user and exit, it switches to root; and when I logout, it executes ls ...
How can we write a shell script to become root? That is I donot want to input the password at prompt it should be within the script itself. I was trying to make but failed to do so.Is it possible, if ...
OS X 10.6.8, if I use Bash Process Substitution as 'root', it just doesn't work. Is it supposed to be so? Why? Note: here's what I mean... "<(list)" mysql -D robottinosino < <(echo ...
I need execute script that have commands which should be run in root mode. If I put sudo before command then when I run script I see permission denied ( I don't have a chance to write password). If I ...
Is it safe to close shell just by clicking "X" or using "ctrl+d" while logged in as root with su or is it safer to close it by typing "exit"? Is there any difference (security-wise) at all or is it ...
Are there any security concerns? What is the best way to enable it?
I am writing a regular compiled application that needs to create a special file and write a magic cookie into it. I can’t write the file directly from the application, the system security model ...
Once a friend of mine (who is an experienced Unix/Linux user) told me that setting root's shell to something other than sh (i.e bash or zsh) might create problems, because some script might assume ...