Linux.com

Community Blogs



Samba Default Sabotaged Please Fix.

Quick background on me, Linux hobbits, burned out programmer, Novell guy that, 10 years ago got sick for a year, lost my company, and now work as the on-site guy for a national Geek company. not "squad".

I get customer getting systems upgrades or Dead HDD’s that want me to haul off their old equipment. So I play with Linux on the old systems, as a hobby not for a living. Been doing this for 10 years or so.

At the start of 2014, I stated getting a lot of old xp system, and down loaded my favorite Linux distro's and started installing...... Could not see Shared xp, win 7 systems. Thought it was just a bug with that release and tried another distro. Same problem, one after another, same problem. Would check boards and try lots of things and get it to work. But over and over on a fresh install, it would not see windows shares. Never had this problem before.

Remember this is a hobby, but after 2 months discovered the problem, small changes to smb.conf where made in the last 6 to 12 months that made it so you can't see XP, win 7 Shares “out of the box”.

I think this was a deliberate by “they who can not be named” that is if you don't want to get sued.

This was done in prep for the upcoming deadline. So that first time Linux installers would install a distro, not see other systems at home and give up on Linux.

Please change the Samba Default to see win shares.

Netbios section

Dns proxy = yes;

Set the “name resolve order” remove “;” by default and set order, I believe it is “bcast host lmhost wins”.

 

Setup mail forwarding in postfix on Ubuntu or Debian

Postfix mail forwarding Postfix is a commonly used MTA (Mail Transfer Agent) program that can receive, deliver or route emails. So if you have your own domain and a server then using postfix you can setup emails on the domain like This e-mail address is being protected from spambots. You need JavaScript enabled to view it . Setting up a full featured mail server with postfix is a lengthy process requiring quite some effort. Furthermore, using your own mail server you do miss out the convenience and features of the...
Read more... Comment (0)
 

Basic Linux Shell Scripting Language : 'Until' Loops

    In the previous articles on Loop Statements, we have seen how a loop works. The For Loop as well as the While Loop keep executing a block of commands till the condition stays true. Once the condition becomes false, the loop is terminated.
 
Read More about 'FOR' and 'WHILE' Loops:
    In this article, we will see a different kind of loop that keeps executing a block of commands till the condition becomes true. The loop is known as 'Until' Loop and it works in totally opposite way as that of the 'While' Loop. Before we proceed to the tutorial part, I recommend that you should read my article on While loops and if you are new to Shell Scripting, please read- Getting Started - Linux Shell Scripting Language.
 
Lets Start!
 
Read more at YourOwnLinux
 

Basic Linux Shell Scripting Language : 'While' Loops

In the previous article entitled "Basic Linux Shell Scripting Language : Introduction to 'For' Loops", we have observed how a loop works. Loop is nothing but a control flow statement which executes a block of commands repeatedly till certain condition stays true, once the condition becomes false, the loop is terminated.
 
    In this article, I will explain Basic syntax of 'While' loop along with some examples of 'While' loop usage. If you are new to Shell Scripting, I recommend that, you should read my article - Getting Started - Linux Shell Scripting Language.
 
Here we go!
 
Read more at YourOwnLinux
 

Basic Linux Shell Scripting Language : Introduction to 'FOR' Loops

    Many times, it is necessary to execute a certain set of commands repeatedly for some number of times. For this purpose, one needs to use looping statements like'For''While' and 'Until'. These statements run a block of code for multiple times. In this article, I will try to elaborate on Basic syntax of For loops with some examples of For loop usage.


Here we go!

Read more at YourOwnLinux

 

Getting Started : Linux Shell Scripting Language - III

This is the third article on Basic Linux Shell Scripting Language. Before this article, I had published two articles on the said topic, which are:
    I would recommend that, before you go through this article directly, please read this article so that it would become easier for you to understand.
 
In this article on Basic Linux Shell Scripting Language, we will be dealing with Mathematics. I will try to cover how basic operations in Mathematics are implemented in Shell Scripting along with some scripts which incorporate their uses. Most of these scripts are self explanatory.


Here we go !

 

Read more at YourOwnLinux

 

Getting Started : Linux Shell Scripting Language - II

In the previous article on Linux Shell Scripting Language, we had already covered following points:
  • What is a Shell?
  • Types of Linux Shell- Bourne Shell, C Shell, Korn Shell and the BASH Shell (Bourne Again Shell).
  • Shell Programming - The Basics
  • Writing the First Shell Script - Hello World
 In this article, we would write some more basic shell scripts that will give you much more comfort while writing more complex scripts. Please note that, this article is an extension of my previous article "Getting Started - Linux Shell Scripting Language".
So, without much a do, lets start the show.
 
Read more at YourOwnLinux
 

Getting Started : Linux Shell Scripting Language - I

What is a Shell..?

    Most of us know the fact that computer understands the language of 0’s and 1’s i.e. Binary language. Whenever we enter any command in the text format, it gets translated to computer-readable form and the processed output which is in binary format gets converted to human-readable form and gets displayed on the screen in the form of texts. Shell performs all these translations. 
 
Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell Linux Shell
 
    The Linux/Unix shell is a command-line interface which lets its users to interact with the operating system by accepting commands from the users through the keyboard; the shell executes the commands and prints the output on the screen. Unlike the graphical environment (GUI based) that we would normally observe in most of the present computers, the interaction is purely text-based and being command-oriented this kind of interface is called “Command Line interface or CLI”. Before GUI environments were introduced in computer systems, CLI was the only way using which an user could interact and operate the computer system.
 
Read more at YourOwnLinux
 

Risk Assessment / Security & Hacktivism 10,000 Linux servers hit by malware serving tsunami of spam

windigo-overview-640x374

Researchers have documented an ongoing criminal operation infecting more than 10,000 Unix and Linux servers with malware that sends spam and redirects end users to malicious Web pages.

Windigo, as the attack campaign has been dubbed, has been active since 2011 and has compromised systems belonging to the Linux Foundation's kernel.org and the developers of the cPanel Web hosting control panel, according to a detailed report published Tuesday by researchers from antivirus provider Eset. During its 36-month run, Windigo has compromised more than 25,000 servers with robust malware that sends more than 35 million spam messages a day and exposes Windows-based Web visitors to drive-by malware attacks. It also feeds people running any type of computer banner ads for porn services.

The Eset researchers, who have been instrumental in uncovering similar campaigns compromising large numbers of servers running the nginx, Lighttpd, and Apache Web servers, said the latest campaign has the potential to inflict significant harm on the Internet at large. They explained:

The number of systems affected by Operation Windigo might seem small when compared with recent malware outbreaks where millions of desktops are infected. It is important to keep in mind that, in this case, each infected system is a server. These usually offer services to numerous users and are equipped with far more resources in terms of bandwidth, storage and computation power than normal personal computers. A denial of service attack or a spam-sending operation using one thousand servers is going to be far more effective than the same operation performed with the same number of desktop computers.
 

Two-Factor Authentication (One time passwords by SMS) for SSH and more

With passwords becoming inherently insecure nowadays, I decided to add an extra layer of security by using the Textlocal One-Time Password API (Its so new I haven't been able to get it documented yet).

One-Time Passwords are unique codes which are sent to a trusted mobile device which can then be checked and then allowed or denied access based on the response back.

This is pretty awesome considering the code can not be guessed, expires after 24 hours, can only be used once, and is separate to the service which is requiring the authentication.

Like I said, I decided to add One-Time Passwords to my Linux server, to do this, I added the following code to the bottom of my user's (my user, since no other users have SSH access) .bashrc file:

tlrequest="username=**EMAIL**&password=**PASS**&numbers=**NUMBER**&message=SSH%20OTP%20is&sender=SSH-OTP"
trap logout INT
curl -s -d $tlrequest http://api.txtlocal.com/otp_send >/dev/null 2>&1
echo "A One-time password has been sent to your device. Please enter it below followed by [enter]:"
read otp
check=$(curl -s "http://api.txtlocal.com/otp_challenge/?username=**EMAIL**&password=**PASS**&numbers=**NUMBER**&code=$otp >/dev/null 2>&1")
if [[ $check == *uccess* ]]
then
    echo "OTP Validated.";
else
    echo "OTP Invalid. Disconnecting."
    logout
fi

To make the code work, you will need:

1. A Textlocal account 
2. Change **EMAIL** to your email address
3. Change **PASS** to your Textlocal password or hash
4. change **NUMBER** to your mobile number (eg 447000000000)

Thats it!

 

6 quick tools to monitor system resources on Linux

Monitor server resources System administrators need to monitor their server to ensure proper functioning. The practice enables administrators to detect possible issues in advance and recover the system, before it causes any trouble. There are plenty of commands on Linux to monitor different system resources like cpu usage, memory usage, network, disk usage and so on. Popular ones are top, htop, iostat, nethogs etc. In this post we are talking about simple command line tools that can monitor multiple system resources like cpu, memory, network, disk, processes etc all together...

Read more... Comment (0)
 
Page 2 of 125

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board