Skip to content

Tag: shell

Making a shell-script run with setuid root

If you want to run a process with root privileges that you can invoke as a less unprivileged user, you can make the program setuid root. This can be very useful, for example, when you want a PHP or CGI script to call a backup process, or to create a new site or irrevocably delete you whole system. The latter example points to a serious security problem: if anyone can figure out a way to make your program do something you don't want, you're screwed, because you just gave them root privileges to wreak maximum havoc. That's why, normally, scripts (anything executed by an interpreter by the kernel because of a shebang) won't get elevated privileges when you set their setuid bit. Read More »


For a Vimperator user like me, Goosh (the unofficial Google shell) is an obvious replacement for Google's normal search page. Read More »

Preventing syntax errors with old shell scripts

I was trying to install Unreal Tournament GOTY on one of my Linux machines. I downloaded and ran the script but I got this error: Read More »

Wget one-liner

Earlier today, I wanted to download all songs by this totally kick-ass rap outfit: Read More »

XTerm is favorite

XTerm is know to most X-Windows users as that ugly terminal with the strange scrollbar and the unreadable font. And it doesn't even have tabs! But, I think it's the best damn terminal emulator in the world. It just doesn't appear that way at first. Read More »

Disabling SSH shell access for SVN users on a Linux/Unix system

A common problem is that Linux/Unix system administrators want to grant users access to SVN repositories, but prevent them from logging in on the shell. This can be accomplished quite easily. Read More »

Microsoft batch file meets bash shellscript

Luca City, who already shared a nice readline keyboard shortcut with me, wrote me again on May 14 to share another unrelated, but very interesting trick: Read More »