Samba Cheat Sheet Command Page

Mount Sharing Folder in a other Server, Workstation running Linux Samba Shared Directory or Folder

mount -t cifs // /mnt/mount_point_name/ -o username=samba_username_for_access

Example :

user@hostname:~# mount -t cifs // /mnt/test/ -o username=mike
Password for mike@// ****************

How to Share Folder in Linux using samba

This is an article for showing on how to share folder in Linux using an utility called samba. Precisely before sharing a specific folder in Linux, to be able to make a certain person or only a specific user that can access that specific folder shared, first of all create a user for accessing it. The article for creating user can be found in the following article titled ‘Add Samba User in Linux with smbpasswd’ in this link or another article titled ‘Create User for specific purpose like Samba Sharing’ in this link or even in this link which is actually an article titled ‘Reset Samba User Password via Command Line’ to reset password for an existing samba user.

So, after the user has already been created the next step is to make sure that the sharing folder definition has already been defined. Below are steps taken to provide the sharing folder via samba :

Continue reading “How to Share Folder in Linux using samba”

How to Change Directory Permissions in Linux Recursively

As shown in the title of this article, this article is written to describe or to show how to change directory permissions in Linux operating system recursively. In order to do that, an effective way to achieve it is by using an appropriate command executed. The command itself usually executed in a command line interface or a CLI-like utility such as terminal.

In the terminal, there will be a bash-prompt provided or a shell bash-prompt available to execute the command for changing directory permissions in linux recursively. Depends on the user logged-in, usually a normal user can have a default shell-bash prompt for executing command.

So, in order to change the permission of a folder, below is the command pattern :

Continue reading “How to Change Directory Permissions in Linux Recursively”

How to Check Operating System Name and Version in Linux

This article is written to show how to do the thing specified in the title of this article. It is about how to check operating system name and also the version of it. In order to achieve the purpose or the goal, the exact or the suitable command is needed to be performed. It is actually a command performed in any terminal or any tool which is considered as text or command line interface. Any host, workstation or server which is running in a GUI (Graphical User Interface) or in a CLI (Command Line Interface) doesn’t matter at all. As long as the operating system has any command line interface in order execute a command for printing or showing the operating system name. Below is the command :

Continue reading “How to Check Operating System Name and Version in Linux”

How to Check Physical Memory in Linux

This article specifically written for showing on how to check the physical memory of an operating system which in this context, it is the physical memory of a Linux operating system. Using specific command, the amount of size possessed which is describing the total size of physical memory can be revealed. To be able to show the memory size of the physical memory attached in the server, host or workstation, it can be achieved by executing command available in the operating system :

1. cat /proc/meminfo

It is actually a command to display the content of the file named meminfo located in /proc.

Continue reading “How to Check Physical Memory in Linux”

How to use dig and nslookup in CentOS 7

Specific tool which is important in an operating system where in this context, it is Linux operating system, it is dig and nslookup. But in order to have a tool mentioned above, dig and nslookup, there is a step which is needed to be taken so that it can be available to be executed from the Linux operating system associated. The Linux operating system mentioned in the context of this article, it is CentOS 7.

CentOS 7 has its own software package manager utility for managing the installation of application, program, package or any other tools or utilities needed to perform specific task or function. Derived from Redhat Linux operating system family, CentOS uses yum utility as its software package manager.

Speaking of installing tools or utilities which is needed to execute or to perform specific task or function, dig and nslookup are tools or utilities utilized to resolve name server.

Continue reading “How to use dig and nslookup in CentOS 7”

How to SSH Automatically without Password using Public Key

This is an article related on the administration of Linux operating system specifically on how to SSH automatically without password using a public key. Sometimes, network administrator or any professions or roles related which need a remote access to a specific host, server or workstation must have an automatic access without having to entry the password.

For an instance, if there is a certain file which is generated daily as a backup mechanism executed by a cron task scheduler and it need to be moved or it need to be duplicate as soon as possible without having to be interfered or done by someone manually, the process of the file duplication where the destination exist in a remote host, server or workstation or any other storage media, it is important to connect or to copy remotely in a non-interactive mode. In other words, no password is needed to do the task described above.

The protocol utilized to accomplish the tasks is a remote access protocol known as SSH (Secure Shell). It is a network protocol for permitting remote access securely so that the means for accessing remote host, server or workstation is provided securely. Below are the steps taken to accomplish the task :

  1. Generate public key from the server, host or workstation which is going to remote the destination server, host or workstation as shown below :

Continue reading “How to SSH Automatically without Password using Public Key”