Archive for category Technology Recipes

Linux mount network share via CIFS


Place the following in the /etc/mtab file at the end of the file:

//ip.addr(or name)/sharedFolder /local/directory cifs rw,mand 0 0

Okay, so I’ve since learned that you don’t need to or even want to modify the /etc/mtab file. This file lists the currently mounted file locations or block devices. (thus “mtab”… Mount Table)

Also in the /etc/fstab you need to place the following at the end of the file:
//ip.addr(or name)/sharedFolder /local/directory cifs defaults,rw,username=username(whatever it is),password=password(whatever it is) 0 0

In the fstab entry the elements need to be separated by "tab" instead of "space" except for at the end (0 0) The 0's are separated by a space.

Tags: ,

Internal player – MythTV

Internal player

From MythTV

Jump to: navigation, search

MythTV includes a built-in media player to play back your recordings, videos and DVDs. The Internal Player is based on the FFmpeg source with several modifications and supports an expanding range of video and audio codecs.

The Internal media player is now the recommended player for DVDs and other file types over external players, such as Xine or Mplayer, and supports the following features:

* DVD playback

* ISO playback

* DVD menus

* Subtitles (DVB, Teletext, CC, External, DVD etc)

* Multiple audio tracks

* MHEG

In order to use the Internal Player in MythDVD or MythVideo set the player to “Internal” (capital I) and ensure that the Default Player option is not selected. Internal player playback settings for MythDVD and MythVideo are controlled by the MythTV TV playback settings.

As of 0.21, YUV411P, UYYVYY411, or YUV410P modes are not supported.

via Internal player – MythTV.

Tags:

MythVideo – MythTV

Internal PlayerThe MythTV Internal player is the recommended player for Video and DVD playback from 0.21 onwards. It will also play DVDs and DVD isos will full menu and subtitle support. It uses the same OSD, settings, remote bindings and audio configuration as playback of recordings making it much easier to setup and use than an external player. It supports almost all video formats and content including High Definition and in addition a wide range of easily accessible features including configurable aspect ratios, picture fill modes, timestretch, bookmarks, video editing, automatic locale based or manual selection of subtitle and audio streams and much, much more.

To use the Internal player in “File Extensions” set: Type in file suffix eg mpeg or avi… File Type to: “Internal” or blank

Default player is unticked

The Internal player uses ffmpeg so all supported codecs are documented on the ffmpeg project site . Playback decoding is controlled by the MythTV TV playback settings

via MythVideo – MythTV.

Tags:

Adding a Directory to the Path

Adding to All Users’ Paths (except root)

You globally set a path in /etc/profile. That setting is global for all users except user root. Typical /etc/profile files extensively modify the $PATH variable, and then export that variable. What that means is you can modify the path by appending or prepending the desired directory(s) in existing statements modifying the path. Or, you can add your own path modification statements anywhere before the existing export statement. In the very unlikely event that there are no path modification or export statements in /etc/profile, you can insert the following 2 lines of code at the bottom of /etc/profile:

PATH=$PATH:/data/myscripts

export PATH

via Adding a Directory to the Path.

Tags:

how to show size of files in FIND command – Linux Forums

find . -size +1024c -type f -print0 | xargs -0 du -h | sort -sn

via how to show size of files in FIND command – Linux Forums.

I saved this as “fsortsize.sh” in /usr/local/sbin

Tags:

Slicehost Forum – Upgrade from Gutsy to Hardy now Gutsy out of support date

I’ve go the same problem with needing to upgrade my slice from Gutsy to Hardy. Looks like you can still get to the Gutsy repositories, and then upgrade to Hardy, as explained here:

https://help.ubuntu.com/community/EOLUpgrades

I’ve executed the following steps with no problems:

sudo perl -p -i.ORIG -e `s/(?:(?:\w+.)?archive|security).(ubuntu.com)/old-releases.$1/` /etc/apt/sources.list
sudo aptitude update
sudo aptitude install update-manager-core update-manager
sudo aptitude upgrade

I have not yet taken the next step, which is:

sudo do-release-upgrade

I expect it’ll just work, but still I think I’ll try it when I’ve got a few free hours to recovery in case something goes wrong. If you try it please post your results back here.

via Slicehost Forum – Upgrade from Gutsy to Hardy now Gutsy out of support date.

Tags: ,

Slipstreaming XP SP3 + Hotfixes + DriverPacks

Here’s the best way to do it.

 
 

  1. Start with a core copy of Windows XP
  2. Download SP3
  3. Download RyanVM Integrator.
  4. Download user_hidden’s Hotfix pack
  5. Download user_hidden’s dotnet addon pack (direct link to file)
  6. Download driver packs.

     
     

     
     

Tags: ,

SG560 Packet Filtering for forwarded packets vs Access Control

Spent all day trying to figure out why some of my packet filtering rules weren’t working.  I’ve got two SG560 units VPN’d together via an IPSec tunnel.  One has version 3.1.6 firmware and the othr has version 3.2.2

It appears that between these two version they handle the “Access Control” feature differently.  With 3.1.6 when you enable the “Access Control” for “Internet”:

AcessControl1

and don’t even choose to block or enable anyone in the ACL

ACL List

ACL List

then it changes the way packets are generated.  It suppresses the triggering of the Packet Filter rule for port 80 and delegates control over that to the authd or Access Control feature.   That is for firmware version 3.2.2.  For version 3.1.6 the Packet Filter rule is still triggered.

Images below with descriptions:

Version 3.2.2

So I remembered it wrong.  The source address does not change, but the packet filter rule based on “Type: Forward” is not triggered.  Rather the “authd” is triggered (I think this is a different service or daemon from ipchain).  I just spent some time googling it and here is a description for Authd

Here the Packet Filter rule is enabled for Type: Forward and port 80, but it is not triggered.

Here the Packet Filter rule is enabled for Type: Forward and port 80, but it is not triggered.

Here the ACL within the Access Control is set to block port 80 and authd is triggered.

Here the ACL within the Access Control is set to block port 80 and authd is triggered.

In this case (to the left) the “All Forward Block” is being triggered for a ping request which uses ICMP and thus the rule is triggered.  But the other rule that is active for blocking Type: forward for port 80 is not triggered.  It is suppressed somehow and authd is put in its’ place.


Version 3.1.6

Okay, so after exhaustive testing I have concluded that there is no difference between the firmwares.  But when I first went through this exercise last week (didn’t have time to document last week when I first went through my testing) I could have sworn that each firmware was handling he packets differently.  But now every test I do shows that they handle it the same.

Bottom line:

You must have Access Control disabled in order for the Packet Filter rules for the Type: Forward to be triggered.  At least for outbound traffic going out from the internal network.  I haven’t and am not planning on testing for packets forwarded from the outside in using port forwarding.

If you have Access Control enabled you can then use the ACL to determine which hosts will be blocked or allowed which will use the “authd” protocol, application, whatever you want to call it, to perform the blocking.

Whew… I’m done.

Tags: , ,

Anti-Virus / Anti-Malware steps

Stopping Malware


The onset of Malware Trojans on the Internet has become a problem. And, since I noticed there is a lot of misinformation on how best to handle it, this document was designed to cut through the emotional clutter and get to the real solution.

Hope it helps!


  1. Download, install (with no shortcuts) and run HiJackThis.org and clear all aberrant BHOs (browser helper object)
  2. Check the %windir%\system32\drivers\etc\hosts file isn’t corrupted with malware entries (like “??????” entries).
  3. Run cleanall.bat (cleansrv.bat or cleanwks.bat to clean remotely)
  4. Run “delprof /q /I /d:7”
  5. Download and run combofix
  6. Download, install and run with no “program files” shortcuts and or desktop/menu shortcuts MalwareBytes.org (Run update until it says you have the latest)
  7. Inform the users of the almost always required reboot and restart when ready.
  8. Rerun MalwareBytes just to be sure all is well.


In the never ending fight to stop Malware we all have our struggles. But the best way to handle it is to ensure your users are running with user permissions and not as an admin, have a good anti-virus software (Symantec or Avert is recommended) that updates itself and keep your malware tools ready.


Report all malware urls to your local ISP whenever possible.


Patrick James Burwell

Infrastructure Engineer

Parsippany, NJ


Cleanall.bat, cleansrv.bat and cleanwks.bat are attached


Cleanall.bat:
%systemroot%
cd /D C:\Documents and Settings
REM -Clean Temp Folder-
for /D %%a in (*.*) do DEL /F /Q "%%a\Local Settings\Temp\*.*"
for /D %%a in (*.*) do FOR /D %%b IN ("%%a\Local Settings\Temp\*.*") DO RMDIR /S /Q "%%b"
cd /D C:\Documents and Settings
REM -Clean IE Cache-
for /D %%a in (*.*) do DEL /F /Q "%%a\Local Settings\Temporary Internet Files\*.*"
for /D %%a in (*.*) do FOR /D %%b IN ("%%a\Local Settings\Temporary Internet Files\*.*") DO RMDIR /S /Q "%%b"
cd /D C:\Documents and Settings
REM -Clean Dr Watson Logs-
for /D %%a in (*.*) do DEL /F /Q "%%a\drwtsn32.log"
cd /D C:\Documents and Settings
REM -Clean Clean KB Logs-
DEL /Q /S /F %systemroot%\KB*.log
cd /D %windir%\softwaredistribution\Download\
REM -Clean SoftWareDistribution-
DEL /Q /S /F %windir%\softwaredistribution\Download\


Cleansrv.bat:
set /p server="What @file.txt or \\server to run Cleanall.bat on? " :
call psexec -accepteula -c -d %server% \\%userdomain%\netlogon\cleanall.bat
set server=


Cleanwks.bat:
set /p system="What @file or \\system to run Cleanall.bat on? ":
psexec -accepteula -d -s -c %system% -u %userdomain%\%username% \\%userdomain%\netlogon\cleanall.bat

Tags: ,

Gigabit to Gigabit NIC connection (No crossover cable needed)

With gigabit, you don’t need to worry about crossover, just connect them with one of your cat6 cables.

via What’s the REAL speed of 1 Gigabit network connection? – Topic Powered by Eve Community.


So actually it turns out (after a little more googling) this is not always true.  It depends on the PCs/Devices being connected together.  Some support auto-negotiation and others don’t.

Here is the pinout for making a gigabit crossover cable (different than 100 Base-T crossover)

Pin Connector #1 Connector #2
1 white/orange white/green
2 orange green
3 white/green white/orange
4 blue white/brown
5 white/blue brown
6 green orange
7 white/brown blue
8 brown white/blue

Tags: , , , ,

Bad Behavior has blocked 473 access attempts in the last 7 days.

Better Tag Cloud