Wednesday, March 7, 2012

Linux Set Date and Time From CLI

Ever wanted to change date of your Linux or any other UNIX based OS date and time only by using terminal / konsole / ssh etc... no problem... here's how (thanks to Vivek Gite of cyberciti.bz):
 
How can I set the system date and time from the command prompt (bash shell)? I don't have GUI installed and I am login over ssh session. How can I set date under Linux operating systems?
Use the date command to display the current date and time or set the system date / time over ssh session. You can also run the date command from X terminal as root user.
This is useful if the Linux server time and/or date is wrong, and you need to set it to new values from the shell prompt.
You must login as root user to use date command.

Linux Set Date

Use the following syntax to set new data and time:
date --set="STRING"
For example, set new data to 2 Oct 2006 18:00:00, type the following command as root user:
# date -s "2 OCT 2006 18:00:00"

OR
# date --set="2 OCT 2006 18:00:00"
You can also simplify format using following syntax:
# date +%Y%m%d -s "20081128"

Linux Set Time

To set time use the following syntax:
# date +%T -s "10:13:13"

Where,
  • 10: Hour (hh)
  • 13: Minute (mm)
  • 13: Second (ss)
Use %p locale’s equivalent of either AM or PM, enter:
# date +%T%p -s "6:10:30AM"
# date +%T%p -s "12:10:30PM"

LulzSec 'Leader' Turns on Fellow Hacktivists: Feds - Yahoo! News

Just like in a hacker movie, one of the world famous hackers is working with the feds to capture other hackers (crackers) .

Six members of the suspected computer hacking groups affiliated with Anonymous were charged -- including the suspected ring leader, who directed the entire operation from a Manhattan apartment complex -- after it was revealed one of the group's most high profile members has been working with federal authorities for months.
Hector Monsegur, a 28-year-old American believed to use the name "Sabu" on the internet, was arrested by federal agents last year and has been cooperating with law enforcement ever since, officials said. He pleaded guilty last August, a plea unsealed in federal court in Lower Manhattan today.
At least at least four of the five other members of the group were arrested recently based on information provided by Monsegur -- one in Chicago and three overseas, officials said. Each were charged with conspiracy and at least two will appear in federal court in Lower Manhattan later today.
Federal officials said they expect the arrests to seriously damage LulzSec, an underground group also known as Lulz Security, which is also an offset of the hacking group Anonymous.
Law enforcement sources told ABC News that the six people charged are allegedly among the most sophisticated hackers in the world. The FBI said motives for attacks varied -- for example an attack on credit card companies was based on the refusal by the firms to process contributions to the anti-secrecy website WikiLeaks, and another attack was simply a way of mocking internet security. The investigation began with a tip last June, officials said.
The group and Anonymous have taken credit for carrying out a number of high-profile hacking actions against companies and institutions including the CIA's website, Britain's Serious Organized Crime Agency, Japan's Sony Corp and Mexican government websites.
Last month, Anonymous published a recording of a confidential call between FBI agents and London detectives in which the law-enforcement agents discuss action they are taking against hacking.
Anonymous also claimed to be behind the electronic theft of thousands of internal documents from the private intelligence analysis firm Stratfor. In charging documents released today, federal officials said that the charged co-conspirators had stolen credit card information from Stratfor employees and clients and made some $700,000 in unauthorized charges.
Earlier this week, a Twitter account connected to Sabu continued to rant against federal agents, supposedly while he was working with them.
"The federal government is run by a bunch of f*****g cowards. Don't give in to these people. Fight back. Stay strong," a tweet from Monday reads.
While Anonymous and LulzSec by nature have no official hierarchy, the user known as Sabu was one of the most vocal and prominent members in online communities. Fox News first reported Monsegur's alleged involvement with the today's arrests.
ABC News' Jason Ryan, Mark Crudele and Lee Ferran contributed to this report.