Posted by: admin (Sep 24) For all those who have a Linux server with Sendmail service is now necessary to grant the possibility of sending through authentication. Indeed it is quite easy to enable the option, though you should be aware that some distributions like CentOS does not make it available by default, here's how to fix it:
Install the sendmail-cf and cyrus-sasl if not present in the system, for redhat / centos:
[] Yum install sendmail-cf cyrus-sasl
Then edit the sedmail.mc (/ etc / mail / sendmail.mc) and uncomment these lines:
define ( `confAUTH_OPTIONS ',` A') dnl
TRUST_AUTH_MECH ( `LOGIN PLAIN ') dnl
define ( `confAUTH_MECHANISMS ',` LOGIN PLAIN') dnl
For security control anchequesta setting:
DAEMON_OPTIONS ( `Port = smtp, Addr = 0.0.0.0, Name = MTA ') dnl
Now you need to recompile the sendmail.cf file with the program m4:
[] M4 / etc / mail / sendmail.mc> / etc / mail / sendmail.cf
Check and if necessary edit the file / usr/lib/sasl2/Sendmail.conf as follows:
pwcheckjnethod: saslauthd
Now restart sendmail and saslauthd
[] / Etc / init.d / saslauthd start
[] / Etc / init.d / sendmail restart
Finally we check that our work has been corrected:
[] Telnet localhost 25
Trying 127.0.0.1 ...
Connected to localhost.
Escape character is'^]'.
220 xxxxx.xxxxx.xx ESMTP Sendmail 8.12.11/8.12.11; Mon, 23 Aug 2004 12:36:30 +0200
Since we appear sendmail responds by typing:
ehlo localhost
which will be answered if all goes well (the red line that tells us that sendmail accepts the authentication, in addition to plain login may have some other methods, this is correct):
250-xxxxx.xxxxx.xx Hello xxxxx.xxxxx.xx [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-AUTH LOGIN PLAIN
250-DELIVERBY
250 HELP
Posted by: admin (Sep 12) View all rpm packages installed:
# Rpm-qa
I query the rpm db filtering out all packets containing the string 'httpd':
# Rpm-qa | grep httpd
Getting information on a specific package installed, example:
# Rpm-qi httpd
Display the list of files provided by a package installed, example:
# Rpm-ql httpd
Display only a list of configuration files provided by an installed package:
# Rpm-qc httpd
Getting information on the documentation provided by a package:
# Rpm-qc httpd
Display the list of dependencies required by a package:
# Rpm-q httpd-whatrequires
View the capability provided by a package:
# Rpm-q httpd-whatprovides
View the scripts started during installation / removal:
# Rpm-q httpd-scripts
View the history of revisions of the package:
# Rpm-q httpd-changelog
Check out what package a file belongs:
# Rpm-qf / etc / httpd / conf / httpd.conf
Display the list of files provided by a package not yet installed:
# Rpm-qp httpd-2.0.52-3.i386.rpm-l
Fedora / RedHat, sign all packages with a digital private GPG key. To import public-key using the following command:
# Rpm-import / media / cdrom / RPM-GPG-KEY
To verify the integrity of a package before proceeding with the installation, especially if it is downloaded from the Internet, run the next command:
# Rpm-checksig nome_pacchetto.rpm
To verify all packages installed on your system:
# Rpm-qa gpg-pubkey
Installing a binary package:
# Rpm-ivh nome_pacchetto.rpm
Installing a binary package ignoring dependencies required:
# Rpm-ivh-nodeeps nome_pacchetto.rpm
Installing a binary package enjoying in the automatic termination of dependencies:
# Rpm-ivh-aid nome_pacchetto.rpm
Updating a package without changing the configuration file:
# Rpm-U nome_pacchetto.rpm
Updating a package only if it is already installed:
# Rpm-F nome_pacchetto.rpm
Rimuore a rpm package:
# Rpm-e package_name
Check file size, permissions, type, owner, group, MD5 checksum and last modification on the RPM database:
# Rpm-V httpd
Check all packages installed on your system - use with caution, commits the system so far:
# Rpm-Va
Verify a package is not installed:
# Rpm-Vp httpd-2.0.52-3.i386.rpm
This command allows you to extract the files from the package to be converted into a stream and then cpio to extract the executable from the package:
# Rpm2cpio httpd-2.0.52-3.i386.rpm | cpio-extract-make-directories * bin *
Installing a source package i386.
Step 1:
# Rpmbuild-rebuild nome_pacchetto.src.rpm
Step 2:
# Rpm-ivh / usr/src/redhat/RPMS/i386/nome_pacchetto.rpm
Installing a source package i386 (alternative procedure).
Step 1:
# Rpmbuild-recompile nome_pacchetto.src.rpm
Step 2:
# Rpmbuild-bb / usr / src / redhat / SPECS / nome_pacchetto.spec
Step 3:
# Rpm-ivh / usr/src/redhat/RPMS/i386/nome_pacchetto.rpm
Creating a rpm package from source.
We want to create a package from source application example. Download the source from the internet with wget:
# Wget http://www.example.org/dl/example-2.0.0.tar.gz
Example-2.0.0.tar.gz # cp / usr / src / redhat / SOURCE
# Cd / usr / src / redhat / SOURCE
# Tar xzf example-2.0.0.tar.gz
Check if the directory unpacked the file '. Spec', which contains the specifications for the creation of the track, and copy it to / usr / src / redhat / SPEC:
Example.spec # cp / usr / src / redhat / SPEC / example.spec
If the file. Spec does not exist can be created. Finally, prepare the filling for the creation of the new rpm:
# Cd / usr / src / redhat
# Rpmbuild-bb SPECS / snort.spec