July 15th, 2013 | Tags: , , , , , ,

Recently I noticed that my clock was beginning to skew, and NTP wasn’t able to keep up with it.  This is due to having a “system clock” and a “hardware clock” the system clock is the one that the OS controls, while the hardware clock is controlled by the BIOS and runs on the hardware.  So all I did to resolve it was sync up the system clock and then sync the hardware clock based off of the system clock.

Update System Time from NTP Server

NTP will only handle incremental time shifts, but ntpdate will use the time source and then make one large adjustment to fix large skews, of course you could manually set the system clock too.

# ntpdate -u timeserver.local
10 Jul 10:37:19 ntpdate[6702]: adjust time server 172.16.88.208 offset 0.105388 sec

Show the Hardware Clock Time

Here we are going to take a look at the hardware clock.  This can be compared to your system clock to see if the problem is existing for you.

# hwclock --show
Wed 10 Jul 2013 10:35:04 AM CDT  -0.938189 seconds

Update the Hardware Clock with the Time from the System Clock

When you are ready to copy your time from your system clock to the hardware clock, that can be done with the following command.  You can also pull from the hardware clock if you desire.

# hwclock --systohc
Comments Off
July 10th, 2013 | Tags: , , , ,

Most modern switches include the ability to use SSH as a remote communications protocol.  Here we will enable that functionality and disable telnet on the Dell Powerconnect 3548 switches.

Enable SSH

In order to enable SSH we need to generate the keys which will be used by SSH to encrypt the traffic.

console>enable
console# configure
(config)# crypto key generate rsa
(config)# crypto key generate dsa
(config)# ip ssh server
(config)# exit
console# copy running-config startup-config

Disable Telnet

Depending on your config you might not need to disable this, but if it is enabled you should disable it.

console>enable
console# configure
(config)# no ip telnet server
(config)# exit
console# copy running-config startup-config
July 9th, 2013 | Tags: , , , ,

Most modern switches include the ability to use SSH as a remote communications protocol.  Here we will enable that functionality and disable telnet on the Dell Powerconnect 5548 switches.

Enable SSH

In order to enable SSH we need to generate the keys which will be used by SSH to encrypt the traffic.

console>enable
console# configure terminal
(config)# crypto key generate rsa
(config)# crypto key generate dsa
(config)# ip ssh server
(config)# exit
console# write memory

Disable Telnet

Depending on your config you might not need to disable this, but if it is enabled you should disable it.

console>enable
console# configure terminal
(config)# no ip telnet server
(config)# exit
console# write memory

 

 

 

 

Comments Off
July 8th, 2013 | Tags: , , , ,

Most modern switches include the ability to use SSH as a remote communications protocol.  Here we will enable that functionality and disable telnet on the Dell Powerconnect 6248 switches.

Enable SSH

In order to enable SSH we need to generate the keys which will be used by SSH to encrypt the traffic.

console>enable
console# configure
(config)# crypto key generate rsa
(config)# crypto key generate dsa
(config)# ip ssh server
(config)# exit
console# copy running-config startup-config

Disable Telnet

Depending on your config you might not need to disable this, but if it is enabled you should disable it.

console>enable
console# configure
(config)# ip telnet server disable
(config)# exit
console# copy running-config startup-config

 

Comments Off
June 17th, 2013 | Tags: , , , , ,

I have been doing a bit of cleanup around my home file server, and have noticed that while I have a really beautiful collections of family photographs there is no logical organization around these photos.  I have many duplicates names, which would collide in the event of trying to merge multiple directories, and even worse I have many duplicate copies of pictures from various uploads from various devices.

Today we are going to focus on one aspect of that problem, we are going to rename our JPG images based on when the photo was taken.  This will require that the camera which took the photo was writing this metadata to the image in the EXIF format, or that you have manually coded the correct dates in them.  Additionally it also requires that your camera have the correct time on it at the time the picture was taken.  This isn’t so much an issue in the smart phone era but it was an issue with some of my older photos.

I am doing these actions on my Fedora 18 box.  Given the correct tooling you should be able to accomplish them on any Linux.  I used two different tools jhead and exiftool.  I started with jhead as it seemed simpler, however it didn’t work on any of the photos taken with one of my old Android phones.  So I then switched to exiftool.  Both tools worked fine with iPhone photos.

Install Jhead and Exiftool

# yum install jhead perl-Image-ExifTool

Execute JHead to Rename Images

We are going to use a naming convention of YYYY-MM-DD_HH.MM.SS.jpg.  I included a snippet of the output as well.

$ jhead -autorot -nf%Y-%m-%d_%H.%M.%S *.jpg
...
IMG_0023.JPG --> 2012-08-27_18.14.10.jpg
File 'IMG_0024.JPG' contains no exif date stamp. Using file date
IMG_0024.JPG --> 2013-05-27_20.28.44.jpg
IMG_1351.JPG --> 2011-03-19_11.12.16.jpg
Modified: IMG_1352.JPG
IMG_1352.JPG --> 2011-03-25_19.39.30.jpg
...

Some of my Android images threw this error.  For those I switched to the exiftool.

Corrupt JPEG data: 233 extraneous bytes before marker 0xd9

Execute Exiftool to rename Images

Here is the exiftool equivalent of our jhead command above.

$ exiftool -r '-FileName<CreateDate' -d %Y-%m-%d_%H.%M.%S.%%e *.jpg
 630 image files updated
 63 image files unchanged

 

Comments Off
Page 5 of 28« First...34567...1020...Last »
TOP