Login shell and non-login shell

Source: Internet
Author: User


/bin/bash,/bin/sh,/bin/csh ...

The general Linux Default User shell is bash, which means you can log in and knock commands.


Non-landing shell, the classic/bin/nologin is a non-landing shell, that is, if a user default shell is it, the user even log into Linux is not able to use Linux.

=================

Shell is a user and computer communication intermediary, "login shell" to ensure that users and computers to communicate, "non-landing shell" can not allow users to communicate with the computer.

==================


The default login shell for the user is recorded in the/etc/passwd file.

"Non-landing" shell has its specific purpose, such as a Linux server to build an FTP, and create a lot of FTP users, then you can change the default shell of these users to nologin, so that These are Linux users who are unable to log in to the Linux host and can only log on to the FTP server. Security is ensured.


Simply put, the non-login shell cannot log on to Linux.


The configuration file (CentOS6) that the login shell executes sequentially:


/etc/profile->.bash_profile, BASHRC-/ETC/BASHRC

The configuration file executed sequentially by the non-logon interactive shell:


~/.bashrc->/etc/bashrc


#解析

/etc/profile #系统全程的初始化文件, executed for the login shell

~/.bash_profile #个人的初始化文件, executed for the login shell

~/.BASHRC #个人的交互式shell的起始文件

~/.bash_logout #个人登录shell的清理文件, executed when login shell exits



This article is from "Zen Sword as" blog, please be sure to keep this source http://yanconggod.blog.51cto.com/1351649/1883364

Login shell and non-login shell

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.