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.
Special Reports: DevOps
Have projects in development that need help? Have a great development operation in place that can ALWAYS be better? Regardless of where you are in your DevOps process, Linux Journal can help!
With deep focus on Collaborative Development, Continuous Testing and Release & Deployment, we offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, advice & help from the experts, plus a host of other books, videos, podcasts and more. All free with a quick, one-time registration. Start browsing now...
- The Ubuntu Conspiracy
- Science on Android
- A First Look at IBM's New Linux Servers
- Disney's Linux Light Bulbs (Not a "Luxo Jr." Reboot)
- Vigilante Malware
- Bluetooth Hacks
- Vagrant Simplified
- Libreboot on an X60, Part I: the Setup
- System Status as SMS Text Messages
- October 2015 Issue of Linux Journal: Raspberry Pi