|
|
|
|
![]() ![]() |
Nov 15 2007, 03:51 AM
Post
#1
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 4 Joined: 14-November 07 Member No.: 26,160 |
How to download files and make your computer shutoff...
Open up a cosole... login as root i.e. depending on your distro CODE su root Then enter your password now cd to where you want your downloads to be in... CODE cd /home/user or where ever you want your files Then get the downloads urls you want and type this is console CODE wget http://thewegsite 1 && wget http://anotherone.com && poweroff Then press enter And you can leave your computer running knowing that it will turnoff when your done! --- Make sure you have the wget package installed! |
|
|
|
Nov 21 2007, 08:56 AM
Post
#2
|
|
|
Way Out Of Control - You need a life :) Group: [MODERATOR] Posts: 1,980 Joined: 16-August 05 Member No.: 7,896 |
is "poweroff" safe ? I don't know this command. Does poweroff sync the filesystem cache ?
I usually don't use poweroff, I "shutdown -g 0 -h" |
|
|
|
Nov 30 2007, 05:32 PM
Post
#3
|
|
|
Way Out Of Control - You need a life :) Group: Members Posts: 1,366 Joined: 14-September 04 From: Nottingham England Member No.: 570 |
No !!!!!
No No No No No.... NOOOOOOOOOOOOOOO. This is a security problem. wget does NOT need root privilages to download files to your home directory. any bugs in wget that allow arbitary code to run would run as root. as a normal user, the damage an attacker can do is limited.. as root, an attacker could install root kits and other nasties ! The correct thing to do, would be to set SUID on /sbin/shutdown, and as a NORMAL user.. CODE wget whatever; shutdown -h now or setup sudo to allow normal users to run shutdown as root and use CODE wget whatever; sudo shutdown -h now ALSO.... use of the '&&' would prevent the machine from shuting down if the download fails (think of the electiricity bill) use ';' so that the shutdown will run whenever wget exits (even with EXIT_FAILURE) Also, maybe pipe wget stdout so that you can confirm that the download finished succesfully when you reboot. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 30th August 2008 - 02:12 PM |