• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Archives for November 2017

Linux OS Service ‘NetFS’

by admin

Service Name NetFS Description NetFS is a boot-time script used to mount or unmount Network File System (NFS), Samba (SMB/CIFS), and Netware (NCP) file systems. The script is run once at boot time to scan for network-related file system mounts: nfs, smb, cifs, or ncp types. Service administration To view the options available for administrating […]

Filed Under: Linux, Linux Services

How to use variables in shell scripts

by admin

A variable is simply a placeholder for some value. The value can change; however, the variable name will always be the same. Shell variables are capitalized by convention. The shell maintains two lists of variables: 1. Those local to the current shell 2. Those global to all shells (environment variables). Use the set and env […]

Filed Under: Shell Scripting

How to debug shell scripts

by admin

When a script does not work properly, we need to determine the location of the problem. The UNIX/Linux shells provide a debugging mode. Run the entire script in debug mode or just a portion of the script. To run an entire script in debug mode, add -x after the #!/bin/[shell] on the first line: For […]

Filed Under: Shell Scripting

UNIX / Linux : What Is a Shell? What are different Shells?

by admin

What Is a Shell? A shell is a program that provides an interface between a user and an operating system (OS) kernel. An OS starts a shell for each user when the user logs in or opens a terminal or console window. A kernel is a program that: Controls all computer operations. Coordinates all executing […]

Filed Under: Linux

Understanding rsyslog Templates

by admin

Templates modify and format output generated by rsyslog. They allow to specify any format a user might want. They are also used for dynamic file name generation. The following is the syntax to create a template: $template TEMPLATE_NAME,”text %PROPERTY% text”, [OPTION] The fields are described as follows: Field Purpose $template Directive that defines a template […]

Filed Under: Linux

CentOS / RHEL : How to Set up SFTP to Chroot Jail only for Specific Group

by admin

In order to allow ChrootDirectory functionality on a per-user basis, employ a conditionally-executed sshd configuration (using the “Match” keyword) in the sshd_config file. Setting ChrootDirectory on a specific Group, ensures that the users of that group can’t get out of their home directory, in turn ensuring no other users are affected. 1. Create a group […]

Filed Under: Linux

CentOS / RHEL : How to set chroot jail for vsftp only for specific users

by admin

How to set up sftp so that a user can’t get out of their home directory, ensuring no other users are affected? Well, there is an easy way of doing it. We can chroot either all the local users to default $HOME directory or do it only for a specific users. This post specificly lists […]

Filed Under: Linux

CentOS / RHEL : How to set chroot jail for vsftp for all the users

by admin

Under default VSFTP configuration, VSFTP login users can navigate to top-level directories which might cause security issues. There are situations when you do not wish FTP users to be able to access any files outside of their own home directory. The vsftp daemon can be chrooted to implement this policy. Set chroot jail to default […]

Filed Under: Linux

CentOS / RHEL : How to set up chroot jail SFTP

by admin

chrooting sftp is a feature provided by the OpenSSH package in Linux. You can set up a chroot environment to avoid unwanted alterations of the system including uploads in unwanted locations when users are making use of sftp. When you chroot sftp for a specific user or all the users, the users can only access […]

Filed Under: Linux

How to Use the ssh-keygen Command to configure passwordless ssh

by admin

Use the ssh-keygen command to generate a public/private authentication key pair. Authentication keys allow a user to connect to a remote system without supplying a password. Keys must be generated for each user separately. If you generate key pairs as the root user, only the root can use the keys. Generating keys and configuring passwordless […]

Filed Under: Linux

« Previous Page
Next Page »

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright