Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Sat Nov 18, 2017 4:15 pm


News News of Ivorde Unix/Linux/Database/Web/Mail Forum

Site map of Ivorde Unix/Linux/Database/Web/Mail Forum » Forum : Ivorde Unix/Linux/Database/Web/Mail Forum

Welcome to ivorde.ro forum

 [ Total topics 438 Go to page 1, 2, 3, 4, 5 ... 44

Message
 Post subject: BASH shell script to mointor a directory and move file without overwriting destination
PostPosted: Wed Nov 15, 2017 7:48 am 
Hello,

So below is a bash script that will monitor a source directory for file creation and, everytime a file is created, move the file to a destination directory without overwriting the file in the destination.

Script:

$ cat move_file.sh
#!/bin/bash

src_dir=/tmp/test/src
dst_dir=/tmp/test/dst

while : ; do
ls ${src_dir} | while read file ; do
# Check if file from src dir exist in dst
i=1
stop=0
while [ $stop -ne 1 ]
do ...

Read more : BASH shell script to mointor a directory and move file without overwriting destination | Views : 8 | Replies : 0 | Forum : Shell Scripting and Programming

Top
 Post subject: Synchronize OpenLDAP and Microsoft Active Directory
PostPosted: Fri Nov 10, 2017 2:40 am 
We have a MS Active Directory to provide LDAP to our application. Now we would like to setup an OpenLDAP server, with MS AD synchronization.
Besides, for security we need to setup a password policy on this OpenLDAP to disable accounts.
1. Can we do that ?
2. If account is disabled on OpenLDAP, how about on MS AD ?

Read more : Synchronize OpenLDAP and Microsoft Active Directory | Views : 29 | Replies : 0 | Forum : OpenLDAP - Lightweight Directory Access Protocol

Top
 Post subject: BGP Notification Message (3), length: 21, OPEN Message Error (2), subcode Authentication Failure
PostPosted: Fri Nov 03, 2017 8:24 am 
When Junos is configured for an external BGP session with a neighbor not directly connected, without the "multihop ttl 2" configuration statement, it will fail to accept the neighbor with a notification message following the open message:
Code:
   Notification Message (3), length: 21, OPEN Message Error (2), subcode Authentication Failure (5)


There is no fix, but correct configuration: if ebgp neighbor is not directly connected, it's mandatory to:
# set protocols bgp group <GROUP> multihop ...

Read more : BGP Notification Message (3), length: 21, OPEN Message Error (2), subcode Authentication Failure | Views : 26 | Replies : 0 | Forum : Routing and dynamic routing protocols

Top
 Post subject: FreeBSD: Install python package manager (pip)
PostPosted: Fri Nov 03, 2017 6:16 am 
Code:
# python2 -m ensurepip
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/site-packages
Collecting pip
Installing collected packages: pip
Successfully installed pip-9.0.1

Read more : FreeBSD: Install python package manager (pip) | Views : 16 | Replies : 0 | Forum : Shell Scripting and Programming

Top
 Post subject: Problem pinging and using server with mobile hotspot
PostPosted: Mon Oct 23, 2017 10:19 pm 
I have eliminated the cost of Isp by getting an unlimited mobile sprint ZTE hotspot. I used a WiFi bridge to connect to my home router. Everything works fine for appleTV, web surfing and Echo. However I have Tablo and some home servers which I can not access remotely. I am trying to diagnose the issue. Simply using the hotspot. My IP address shows different ip addresses. One is 66.87.124.xxx, another site shows ipv6 address. ...

Read more : Problem pinging and using server with mobile hotspot | Views : 65 | Replies : 0 | Forum : TCP/IP Networking

Top
 Post subject: FreeBSD: List disk drives and re-scan after adding hot-add disk (in virtual environments)
PostPosted: Fri Sep 15, 2017 2:14 am 
When FreeBSD runs as a Guest Operating System in Vmware ESXi or other hypervisor, disks can be hot added (without powering off the system).

List available disk in FreeBSD.
Code:
$ sudo camcontrol devlist
<NECVMWar VMware IDE CDR10 1.00>   at scbus1 target 0 lun 0 (cd0,pass0)
<VMware Virtual disk 1.0>          at scbus2 target 0 lun 0 (da0,pass1)
<VMware Virtual disk 1.0>          at scbus2 target 1 lun 0 (da1,pass2)


After new disk has been added to the ...

Read more : FreeBSD: List disk drives and re-scan after adding hot-add disk (in virtual environments) | Views : 70 | Replies : 0 | Forum : Memory, Storage, Backup and Filesystems

Top
 Post subject: JUNOS BGP: How to drain a BGP peering router gracefully without bgp session reset
PostPosted: Thu Sep 14, 2017 10:09 am 
As many of us found out the hard way, certain export policy changes at neighbor level will hard reset the bgp session due to Junos internal architecture of update groups.

When a peering BGP router (or any bgp router for that matter) needs to be drained for maintenance, there aren't many obvious options:
1. disable bgp.
2. set import/export policies at neighbor level that reject everything.
3. disable interfaces towards bgp neighbors.

1st resets BGP ...

Read more : JUNOS BGP: How to drain a BGP peering router gracefully without bgp session reset | Views : 87 | Replies : 0 | Forum : Routing and dynamic routing protocols

Top
 Post subject: NGINX: 413 Request Entity Too Large
PostPosted: Thu Sep 14, 2017 4:48 am 
Edit nginx.conf or vhost configuration file and modify or add following line adjusting the desired size.:

Code:
...
      # Upload maximum size
      client_max_body_size 15M;
...


If your site is most probably using PHP, nginx also needs to set the following php parameter:

Code:
...
        location ~\.php($|/) {
                fastcgi_param PHP_VALUE "post_max_size=15M \n upload_max_filesize=15M ";
...

Read more : NGINX: 413 Request Entity Too Large | Views : 59 | Replies : 0 | Forum : Apache, Nginx, Lighttpd and other web server software

Top
 Post subject: MAC OS X: read image/jpeg EXIF information on command line
PostPosted: Mon Sep 11, 2017 8:52 am 
MAC OS X provides a tool to analyze image/jpeg EXIF metadata, including GPS coordinates of the photo, the camera it was taken on and so on.


Quote:
MDLS(1) BSD General Commands Manual MDLS(1)

NAME
mdls -- lists the metadata attributes for the specified file

SYNOPSIS
mdls [-raw ] file ...

DESCRIPTION
The mdls command prints the values of all the metadata attributes associated with the files provided as an argument.

The following options ...

Read more : MAC OS X: read image/jpeg EXIF information on command line | Views : 117 | Replies : 0 | Forum : System administration

Top
 Post subject: Shell scripting
PostPosted: Thu Aug 24, 2017 3:10 am 
Hi Friends,

I want to write a schell script for below tasks,
01. there are five tables and want to get the row count of them
02. check if the count of any table is more than 10000 mail subject need to send as RED status, if its is less than 10000 then the status should change as GREEN.

Iam new to shell scripting

Could someone help me for this?

Read more : Shell scripting | Views : 58 | Replies : 0 | Forum : Shell Scripting and Programming

Top
 [ Total topics 438 Go to page 1, 2, 3, 4, 5 ... 44


Last 10 active topics


Shell Scripting and Programming

No new posts BASH shell script to mointor a directory and move file without overwriting destination
View the latest post
No new posts FreeBSD: Install python package manager (pip)
View the latest post
No new posts Shell scripting
View the latest post

OpenLDAP - Lightweight Directory Access Protocol

No new posts Synchronize OpenLDAP and Microsoft Active Directory
View the latest post

Routing and dynamic routing protocols

No new posts BGP Notification Message (3), length: 21, OPEN Message Error (2), subcode Authentication Failure
View the latest post
No new posts JUNOS BGP: How to drain a BGP peering router gracefully without bgp session reset
View the latest post

TCP/IP Networking

No new posts Problem pinging and using server with mobile hotspot
View the latest post

Memory, Storage, Backup and Filesystems

No new posts FreeBSD: List disk drives and re-scan after adding hot-add disk (in virtual environments)
View the latest post

Apache, Nginx, Lighttpd and other web server software

No new posts NGINX: 413 Request Entity Too Large
View the latest post

System administration

No new posts MAC OS X: read image/jpeg EXIF information on command line
View the latest post

Login

Username:   Password:   Log me on automatically each visit  

Statistics

Statistics

Total posts 612 | Total topics 982 | Total members 1193



News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO