Best of Technical Support
I am using Red Hat 4.2. I would like to give a user who is not root the permission to shut down the system. The man page says, “write the name of the user in the file /etc/shutdown.allow”. Unfortunately, this has no effect, i.e., the user gets the message “must be root” after typing shutdown. —Thomas Okon, email@example.com
The only way I know of for any user to correctly shut down a Linux system is to be physically present at the keyboard and press ctrl-alt-del. This key sequence has the effect of running shutdown from init(8). This is the default behavior and all /etc/shutdown.allow does is to restrict ctrl-alt-del even more to specifically named users.
I am using Red Hat 5.0. How can I write a script that compares two directories recursively, one on the localhost, the other on an FTP site, then upload only the newer files to the FTP site? I wish to easily update my web site which is getting quite large and difficult to update manually. —Grim_Sweeper@softhome.net
The good news is the solution is already available. The bad news is that you will have to configure it to fit your needs. I'm talking about the mirror package available at ftp://src.doc.ic.ac.uk/packages/mirror/mirror.tar.gz. This is an excerpt from the man page:
Mirror was written for use by archive maintainers but can be used by anyone wanting to transfer a lot of files via ftp. Regardless of how it is called, mirror always performs the same basic steps. It connects to the remote site, internally builds a directory listing of the local target directory, builds one for the remote directory, compares them, creates any subdirectories required, transfers the appropriate files (setting their time-stamps to match those on the remote site), creates any symbolic links, removes any unnecessary objects and finally drops the connection.
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems
Join editor Bill Childers and Bit9's Paul Riegle on April 27 at 12pm Central to learn how to keep your Linux systems secure.
Free to Linux Journal readers.Register Now!
- Cluetrain at Fifteen
- Getting Good Vibrations with Linux
- Embedding Python in Your C Programs
- New Products
- Memory Ordering in Modern Microprocessors, Part I
- Customizing Vim
- [<Megashare>] Watch Mrs Brown's Boys Movie Online Full Movie HD 2014
- Security Hardening with Ansible
- Tech Tip: Really Simple HTTP Server with Python
- RSS Feeds