shutdown -h nowis the proper way to immediately shut down a Linux system. The -h option means halt and now is pretty self-explanatory. We'll have to go into a little more detail about the options available because if you're running a network from your Linux machine, this command may not be the ideal one to use if you need to bring the machine to a halt for maintenence. Your co-workers may be accessing services or be saving critical work on the server, and you would most certainly incur their wrath as they would be denied these services or see their data destroyed. It might be best to do something like this.
shutdown -h +15which means that the system is going to be halted in 15 minutes (+15). It's hard to tell if you've given people the time they need to finish what they're doing, that is, the time frame is up to your judgment.
shutdown -r +15The rules for warning others that may be using the network still apply in a reboot. To check out all the possibilities of the command shutdown, consult the man page: man shutdown.
Cmnd_Alias TOOLS = /bin/mount, /bin/umount, /sbin/shutdown
# this machine
ALL : 192.168.
ALL : ALLwhich means that ALL are denied ALL services. This is standard practice. As we have seen with cron and at, X.deny and X.allow files work on the principle that users who are not specifically allowed to use services are denied them. Though it may sound logical, it needs to be restated that if we use the hosts.deny approach, if your name is not listed, then you're allowed to use all the services offered. If we used the hosts.allow approach, then we establish who can use certain services and we therefore deny the rest to everybody else. This is easier to maintain and it is more secure.