Linux host root switch user get $? result Exception case

Source: Internet
Author: User

1. Problem description First is NBU backup I2000 database, monitoring page to always fail, but in fact, the Rman backup operation has been completed, only the last $? When the exception is caused.

Second, in a business upgrade, the Ideploy tool automatic upgrade before the environmental inspection, the parts are checked not through, unable to automatically upgrade, the final manual upgrade, hundreds of pieces of veneer, really tragic.


2. Problem phenomena

ndmc21:~ # su-sshusr-c "ls"; echo $? Bin Breeze check.sh Documents ideploy_file_history nohup.out public_html 1

As you can see, normally, when you finally fetch $, you should return 0.


3. Problem analysis

In response to this problem, specifically to the SuSE original case, also collected all aspects of the log, or even strace log, the problem has been unable to locate.

I think this problem has not existed before, recently appeared, it should be with the recent security reinforcement has a great relationship, so that the security of the brothers to do the OS level of all the operations are sorted out.

The result is: mainly because the/etc/security directory permissions have been modified,/etc/security-The original permissions: 755, after security hardening, the permissions were modified to: 600.


I tested on several hosts, all OK:

ndmc21:~ # ls-ld/etc/security/drw-------2 root root 368 Jul 00:24/etc/security/ndmc21:~ # su-sshusr-c "ls"; echo $?  Bin Breeze check.sh Documents ideploy_file_history nohup.out public_html 1ndmc21:~ # chmod 755/etc/security ndmc21:~ # su -Sshusr-c "LS"; echo $? Bin Breeze check.sh Documents ideploy_file_history nohup.out public_html 0


Blog Address: http://blog.csdn.net/hw_libo/article/details/38979791
--Bosco qq:375612082
----END----
-------------------------------------------------------------------------------------------------------
Copyright, the article allows reprint, but must be linked to the source address, otherwise investigate legal responsibility!

Linux host root switch user get $? result Exception case

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.