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

FAQ
It is currently Tue May 23, 2017 10:10 am


News News of Tutorials for general Unix

Site map of Tutorials for general Unix » Forum : Tutorials for general Unix

Tutorials applicable on more than one Unix/Linux OS and shell scripts: ssh / openssl / protocols.

 [ Total topics 28 Go to page 1, 2, 3

Message
 Post subject: Re: solderless wall plates? good or no good?
PostPosted: Thu Apr 09, 2015 3:38 am 
The RewriteLog directive sets the name of the file to which the server logs any rewriting actions it performs. If the name does not begin with a slash ('/') then it is assumed to be relative to the Server Root. The directive should occur only once per server config.
Note: To disable the logging of rewriting actions it is not recommended to set file-path to /dev/null, because although the rewriting engine does not then output ...

Read more : Re: solderless wall plates? good or no good? | Views : 459 | Replies : 0

Top
 Post subject: Rsync: How to transfer and remove the source files afterwards
PostPosted: Thu Jan 22, 2015 2:55 pm 

Example how to move files with RSYNC


This articles is valid for all Unix flavours that have rsync available.

Rsync is one powerful tool for Linux administrators that allows one to synchronise two directories/paths based on source/destination model.

Among the many features it offers, there is one particularly useful when a migration (not backup) has to be performed and the source directory has to be wiped.

The rsync option that allows for source files and ...

Read more : Rsync: How to transfer and remove the source files afterwards | Views : 7020 | Replies : 0

Top
 Post subject: How to change user login shell to bash in Linux
PostPosted: Thu Jan 22, 2015 11:37 am 
Newly created users in Debian and Centos Linux will have the default shell "sh" as seen below:
Code:
$ echo $SHELL
/bin/sh


Only root user or a sudo enabled non-root user will be able to change shells. The Linux command to change a user's login shell is "chsh".

Code:
# chsh -s /bin/bash MYUSER

Read more : How to change user login shell to bash in Linux | Views : 647 | Replies : 0

Top
 Post subject: Linux/FreeBSD: How to find process start time or running time with PS
PostPosted: Wed Jan 21, 2015 12:25 pm 
All information about a process is kept in the kernel/process table. To query this information, the pseudo filesystem /proc or the PS command can be used (there also other tools, but I will focus on "ps" here).

The PS command can show both the start time and date of a process and the elapsed time since the process has started. The interesting PS options and modifiers are found in the manual:

Quote:
-o format
User-defined ...

Read more : Linux/FreeBSD: How to find process start time or running time with PS | Views : 3752 | Replies : 0

Top
 Post subject: Reloading /etc/profile - how to reload Unix /etc/profile
PostPosted: Tue Jan 20, 2015 5:29 pm 
Reloading profile, Reloading profile under Unix, Reloading profile under Linux,Reloading profile under BSD, how to reload Unix profile.

Use the following command to reload a unix profile (/etc/profile, ~/.profile, ~/.bash_profile ...):

Code:
$ . ~/.profile
$ . /etc/profile

Notice: . (dot) is a command that originates from source command. On some unix flavours (FreeBSD 6 for example) source command works still:

Code:
$ source ~/.profile
$ source /etc/profile

.profile settings overwrite those in /etc/profile. You can also ...

Read more : Reloading /etc/profile - how to reload Unix /etc/profile | Views : 19464 | Replies : 0

Top
 Post subject: How to check SSL ciphers used in a web server's configuration ciphersuites
PostPosted: Fri May 04, 2012 6:25 am 
Everytime when configuring SSL vhost in apache/nginx or any other webserver, security is the main concern. This means that you have to be careful which cipher blocks you want the webserver to impose.

To check a specific ssl cipher suite used in Apache/Nginx:

Code:
# grep -i cipher httpd.conf
SSLCipherSuite !aNULL:!eNULL:!EXPORT:!DSS:!DES:!SSLv2:RC4-SHA:RC4-MD5:ALL

Now, to see actual ciphers contained by this cipher suite:

# openssl ciphers -v 'SSLCipherSuite !aNULL:!eNULL:!EXPORT:!DSS:!DES:!SSLv2:RC4-SHA:RC4-MD5:ALL'
RC4-SHA SSLv3 Kx=RSA Au=RSA Enc=RC4(128) Mac=SHA1 ...

Read more : How to check SSL ciphers used in a web server's configuration ciphersuites | Views : 8700 | Replies : 1

Top
 Post subject: How to list OpenSSL supported ciphers
PostPosted: Fri May 04, 2012 6:14 am 
To list openssl supported ciphers and see each cipher's characteristics the "ciphers" module in openssl can be used with verbose:


# openssl ciphers -v
DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1
DHE-DSS-AES256-SHA SSLv3 Kx=DH Au=DSS Enc=AES(256) Mac=SHA1
AES256-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(256) Mac=SHA1
EDH-RSA-DES-CBC3-SHA SSLv3 Kx=DH Au=RSA Enc=3DES(168) Mac=SHA1
EDH-DSS-DES-CBC3-SHA SSLv3 Kx=DH Au=DSS Enc=3DES(168) Mac=SHA1
DES-CBC3-SHA SSLv3 Kx=RSA Au=RSA Enc=3DES(168) Mac=SHA1
DES-CBC3-MD5 SSLv2 Kx=RSA Au=RSA Enc=3DES(168) Mac=MD5
DHE-RSA-AES128-SHA SSLv3 Kx=DH Au=RSA Enc=AES(128) Mac=SHA1
DHE-DSS-AES128-SHA SSLv3 ...

Read more : How to list OpenSSL supported ciphers | Views : 744 | Replies : 0

Top
 Post subject: Linux/FreeBSD how to check ntp time synchronization
PostPosted: Tue Nov 01, 2011 9:50 am 
Giving that a system has ntpd up&running, ntpq utility can be used to check system time synchronization:
Code:
# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+80.96.120.251   .PPS.            1 u  984 1024  377   10.723   -0.909   1.437
+80.96.120.252   .PPS.            1 u  851 1024  377   10.800   -0.503   0.476
*80.96.120.253   .PPS.            1 u 1019 1024  377   10.611   -0.698   0.669


Man ntpq quote:
Quote:
NTPQ(8) FreeBSD System Manager's Manual NTPQ(8)

NAME
ntpq -- ...

Read more : Linux/FreeBSD how to check ntp time synchronization | Views : 2072 | Replies : 4

Top
 Post subject: bash: -bash: output: cannot overwrite existing file
PostPosted: Mon Oct 31, 2011 7:03 am 
In Bash shell, redirecting output to a existing file is not possible if the "noclobber" bash option is set.

To overcome this, use the ">|" or ">>" redirect operator. The pipe will overwrite the file if you are using single angle bracket and append if you're using double angle brackets.

How to forcely overwrite a file with output from a command:

# cat output
# echo 'output' >output
-bash: output: cannot overwrite existing file ...

Read more : bash: -bash: output: cannot overwrite existing file | Views : 1836 | Replies : 0

Top
 Post subject: bash: Redirecting standard error to a shell variable and standard output to a file
PostPosted: Mon Oct 31, 2011 6:54 am 
A little background from bashref:http://www.gnu.org/software/bash/manual/bashref.html
Quote:
3.2.4.3 Grouping Commands

Bash provides two ways to group a list of commands to be executed as a unit. When commands are grouped, redirections may be applied to the entire command list. For example, the output of all the commands in the list may be redirected to a single stream.

()
( list )

Placing a list of commands between parentheses causes a subshell environment to be created (see Command ...

Read more : bash: Redirecting standard error to a shell variable and standard output to a file | Views : 1930 | Replies : 0

Top
 [ Total topics 28 Go to page 1, 2, 3


Last 10 active topics


Virtualization

No new posts How to retrieve Vmware ESXi license from ssh shell command line
View the latest post

Shell Scripting and Programming

No new posts Scan IP range using nmap
View the latest post
No new posts Password generator with user inputs bash script
View the latest post

TCP/IP Networking

No new posts TCP ack after two packets
View the latest post

Junos Tips & Tricks

No new posts MTR / My traceroute in Junos
View the latest post

VPS Hosting & Security

No new posts Host a gmod server on a vps or shared host?
View the latest post

Juniper virtual MX (vMX)

No new posts Juniper Virtual MX (vMX) 14.2R5.3 Phase 2 (RE and MPC on different VMs)
View the latest post

OpenLDAP - Lightweight Directory Access Protocol

No new posts cannot login in linux system with ldap user after changing the ldap user password
View the latest post

PHP and other web technologies

No new posts php
View the latest post

TCPdump & Wireshark tips & tricks

No new posts Tcpdump - dump HTTP headers as ASCII and HEX
View the latest post

Login

Username:   Password:   Log me on automatically each visit  

Statistics

Statistics

Total posts 598 | Total topics 967 | 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