0
votes
4answers
131 views

Linux utility to monitor for stupid / likely ill-advised commands

sudoing adds a little bit of a roadblock to doing potentially stupid and dangerous things in the Linux shell, but it is a meager deterrent to newer Linux users. Still, many users login as root or have ...
5
votes
3answers
1k views

Why does 'pkill /?' kill my SSH session?

After running the following commands (bash) as root via SSH: pkill --help pkill -h pkill /? The first two commands didn't provide me any information, that's why ran the third (kinda ...
11
votes
2answers
568 views

What is the difference between “sudo -i” and “sudo bash -l”

There is a recent question regarding multiple sysadmins working as root, and sudo bash -l was referenced. I searched for this on google and SE, but I don't understand the difference between sudo ...
19
votes
4answers
3k views

Ordinary users are able to read /etc/passwd, is this a security hole?

ls -l /etc/passwd gives $ ls -l /etc/passwd -rw-r--r-- 1 root root 1862 2011-06-15 21:59 /etc/passwd So an ordinary user can read the file. Is this a security hole?
0
votes
4answers
1k views

Bash script normal user to Root

I have some question. I'm trying to create some bash script to automatically some task. I need to do the first step of the task as normal user, and su - to be root to finish the task. I've been ...
14
votes
4answers
11k views

Bash Scripting: Require script to be run as root (or with sudo)

I'm trying to write a bash script (in Ubuntu) that will backup a directory using tar. How can I do a check in the script so that it can only be run as root (or with sudo)? For instance, if a user ...
1
vote
2answers
1k views

Ubuntu bash scripting with root commands

I am trying to write a bash startup script in Ubuntu 9.04 that will remove the annoying system beep from my computer: #/bin/bash rmmod pcspkr #remove system beep; also doesnt work without root ...