A problem in Linuxsu

Source: Internet
Author: User
A problem in Linuxsu-general Linux technology-Linux technology and application information. For details, refer to the following section. $ Su-
Password:
Your default context is root: system_r: unconfined_t.
Do you want to choose a different one? [N]

This is because SELinux is enabled during installation. In addition to the root password, the new CentOS version requires the SELinux context to be confirmed for su processing. Although the confirmation information can be ignored directly by pressing enter, it is unnecessary for some automatic scripts that require su.

The solution is to modify the/etc/pam. d/su file and

Session required/lib/security/$ ISA/pam_selinux.so open multiple
This line is changed
Session required/lib/security/$ ISA/pam_selinux.so open

That is, remove the multiple option. If you do not need the kernel protection provided by SELinux, you can modify the/etc/selinux/config configuration file and change the SELLINUX parameter:

SELINUX = disabled

The configuration file will be read by init. After you restart the system, you can run the getenforce command to check the SELinux status. The SELINUXTYPE parameter can also be changed to SELINUXTYPE = strict.

This problem seems to exist in some versions of CentOS 4/RHEL4. You do not need to modify any configurations of the old version system.

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.