Setting Windows Local Security Policy Microsoft (MMC) Part I
Jonathan Caceres, Sep 20, 03:18 1. start
2. Type secpol.msc into search box click scpol.
3. First create a policy regarding passwords. Expand Account Policies
in the left pane and expand Password Policy.
4. Double-click Enforce password history This prevents users from
"recycling" old passwords
5. Change passwords remembered to 4
6. Click ok
7. Double-click Maximum password age in the right pane. The default
value is 42, meaning that user must change his password after 42 days.
8. Change days to 30
9. Click OK
10. Double-click Minimum password length in the right pane. the default
value is a length of 8 characters.
Run Bandzip from the command line
Jonathan Caceres, Jun 17, 00:40
Windows Key + R then type cmd and press ENTER
Syntax:
C:\> bz x \\my directory\my file
Usage:
bz [...] [...] []
a : Add files to archive
x : eXtract files with full pathname
t : Test integrity of archive
d : Delete files from archive
c : Create new archive(or overwrite exist file)
e : Extract files without directory names
l : List contents of archive
v : Verbosely list contents of archive(ZIP format only)
rn: Rename files in archive
- Stop switches scanning
-l:<0...9> Set compression level (0:store, 5:default, 9:maximal)
-r- Disable recursion (default)
-r Enable recurse subdirectories
-aoa Overwrite All existing files without prompt
-aos Skip extracting of existing files
-aou aUto rename extracting file
(for example, name.txt will be renamed to name (2).txt)
-sfx:[{name}] Create SFX archive
-zopfli Use Zopfli as deflate compressor(very slow)
-p:{password} Set password
-o:{dir} Specify target folder
-y Assume Yes on all queries
-fmt:{fmt} Specify archive format
(zip, zipx, exe, tar, tgz, lzh, iso, 7z, gz, xz)
-v:{size} Specify volume size(-v:1000000 -v:1440k -v:100MB ...)
-target:auto Extract to target path smartly
-target:name Extract to archive-name folder of target path
How hard is to delete a file on your hard disk?
Jonathan Caceres, Oct 08, 02:02
Today an office worker has to deal with hundreds of files. But how hard is to
delete a file?
Most people could said in a tenageer way that this question is pretty obviously
to answer, just hit the delete key on your keyboard.
We can tell you that yes and no that answer is correct. The file you see on
your monitor or display is just a graphical representation of a physical
address on your hard disk.
That means the computer shows you a graphical simulation of an address location
on your hard disk, deleting the file from your monitor is what you can see but
in reality the file still sitting on your hard disk all the time.
But what really happens? the OS (operative system), renames the file that tells
this file is not longer visible for the system but still remaining on the physical
address on the hard disk.
But good news of bad news for some people, the file still there and can be recover
so that make so easy for law agencies to discover the undiscovered using
forensic tools to restore delete files, hidden files, or other form of hide
information deeply inside a files.
Delete a file could be harder than you think.
ToolsNorton Utilities Suite program WipeInfo
Overwrites over and over the hard disk location until is deleted any
source of information.
Looking for that file?
Jonathan Caceres, Oct 08, 02:03
findstr is a command in the command prompt for more info at: Microsoft
How to use: e.g. you need a document that contains the word "Organic"
Syntax: c:\users\Documents\word\network>findstr /s /i Organic *.*
/s Searches the current directory and all subdirectories.
/i Ignores the case of the characters when searching for the string.
*.* any file any file extension
Parameter Description
/b Matches the text pattern if it is at the beginning of a line.
/e Matches the text pattern if it is at the end of a line.
/l Processes search strings literally.
/r Processes search strings as regular expressions. This is the default setting.
/s Searches the current directory and all subdirectories.
/i Ignores the case of the characters when searching for the string.
/x Prints lines that match exactly.
/v Prints only lines that do not contain a match.
/n Prints the line number of each line that matches.
/m Prints only the file name if a file contains a match.
/o Prints character offset before each matching line.
/p Skips files with non-printable characters.
/off[line] Does not skip files that have the offline attribute set.
/f: Gets a file list from the specified file.
/c: Uses the specified text as a literal search string.
/g: Gets search strings from the specified file.
/d: Searches the specified list of directories. Each directory must be
separated with a semicolon (;), for example dir1;dir2;dir3.
/a: Specifies color attributes with two hexadecimal digits.
Type color /? for additional information.
Specifies the text to search for in FileName. Required.
[:][][ ...] Specifies the location and file or files to search.
At least one file name is required.
/? Displays Help at the command prompt.
Windows Removing the MAX_PATH Limitation
Jonathan Caceres, Oct 04, 23:54
Use your regedit program
locate this on your directory
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem@LongPathsEnabled
then change value to 1
and your problem of seen
C:\~fielname.txt changes to
C:cd \network\computer\users\yourname\yourfirstdirectory\seconddirectory\thirddirectory\fourthdirectory\filename.txt
Create multiple folders with one script line Windows
Jonathan Caceres, Oct 08, 01:59
Hi guys, have you got the problem when you need to create several folders
and perhaps in alphabetical order. For example your boss ask you to create
in alphabetical order a directory list to store your customers invoices.
Solution: You could created the whole bunch of folders with only one line in using your
command prompt or CMD. Here is the script.
Script:
FOR %n IN (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) DO md E:\scripts\%n
UNIX 10 Essential Commands
Jonathan Caceres, Oct 11, 13:06
UNIX 10 Essential command line tools
<<< grep >>> Grep is a useful tool for searching text files, including log files,
including log files, using regular expressions.
<<< netstat >>> The netstat command shows network status. It is very useful
for showing the active network connections on a machine.
<<< traceroute >>> The traceroute command shows the route of a network packet toa given
host. It is used for troubleshooting network problems.
<<< find >>> The find command is useful for searching for files and directories in a
directory hierarchy. You must learn this command.
<<< tripwire >>> Tripwire is a tool used for security to detects changes to files
and is very useful for knowing if your website has been hacked.
<<< unison >>> An open source file synchronization tool for text and binary files,
this tool is great when you are working with more than two computers and want your files synchronised.
<<< drush >>> Drush is the CLI of Drupal, a popular CMS. IF you are a Drupal
user, you should learn drush as it is a great time-saver.
<<< graphviz >>> The Graphviz command line tools help you present graph
structures and can be used in networking, database web structures, embedded in scripts and much more.
<<< vi or Emacs >>> Both vi and Emacs are very popular
text editors among system administrators.
Linux Dedicated Servers
Lost your file in you USB device
Jonathan Caceres, Oct 08, 02:06
Problem: forgot to save or ejected properly
your USB external device memory or hard disk.
Trying to recover a file could be stressful task and critical when you whole work
depends on that. A backup file can not be found or your Ms Office suit
can not recover unsaved documents.
What I can do to recover my file from my USB memory stick or Hard disk?
This is what you can do
Use this command in your command prompt window. You know how to open that
1. Windows key and then the key r
2. type cmd
3. locate your usb drive letter normally E:, F:, G:, ..., Z:
4. you do this like cd\ enter then type cd E: and then enter
5. now you are here E:\ then
6. type attrip -r -a -s -h /s /d
something like that E:/attrip -r -a -s -h /s /d
7. then you probably can see again the file/s appear in the USB folder
Not enough free disk space UBUNTU Linux
Jonathan Caceres, Oct 08, 02:06
For several weeks my adorable PC has this pop up message every time the software updater were running.
Not enough free disk space
The upgrade needs a total of 126 M free space on disk '/boot'. Please free at least and
additional 33.3 M of disk space on '/boot'. You can remove old kernels using 'sudo apt autoremove',
and you could also set COMPRESS=xz in /etc/initramfs-tools/initramfs.conf to reduce
the size of your initramsfs."
However, it did not work with that suggestion so, the other way found it for that issue is the following;
First, I check which version is currently being used with this command. You might have
downloaded a new version but have not rebooted and are using the prior version. If you
need to reboot to activate the current version, do so before continuing.
_____uname -a
Example output:
Linux srv-ubuntu
4.4.0-112-generic #135-Ubuntu SMP Fri Jan 18 11:48:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Next, I would list the kernels in /boot (mine all started with "vm" as a prefix
because I run in a virtual environment)
_____ls -l /boot/vm*
Example output:
_____-rw------- 1 root root 7104528 Jan 9 2018 /boot/vmlinuz-4.4.0-109-generic
_____-rw------- 1 root root 7110608 Jan 19 2018 /boot/vmlinuz-4.4.0-112-generic
Next, I would find the matching headers:
_____sudo apt-get purge linux-image-4.4.0-109-generic
_____ls -l /usr/src
Example output:
_____drwxr-xr-x 27 root root 4096 Jan 13 2018 linux-headers-4.4.0-109
_____drwxr-xr-x 7 root root 4096 Jan 13 2018 linux-headers-4.4.0-109-generic
_____drwxr-xr-x 27 root root 4096 Feb 2 2018 linux-headers-4.4.0-112
_____drwxr-xr-x 7 root root 4096 Feb 2 2018 linux-headers-4.4.0-112-generic
Then I would remove the matching headers with a command like this
(note, you do not need to include "-generic" at this point):
_____sudo apt-get purge linux-headers-4.4.0-109
For more info: https://ubuntuforums.org/showthread.php?t=2398872