Linux host root switch user get $? Result exception case

Source: Internet
Author: User

Linux host root switch user get $? Result exception case
1. The first problem is that when NBU backs up the I2000 database, the monitoring page shows that it always fails, but in fact, the rman backup operation has been completed, but the last result is to get $? Exception.

Secondly, during a business upgrade, the ideploy tool performs an Environment check before the automatic upgrade. All components fail to be checked and cannot be automatically upgraded. The last manual upgrade includes several hundred boards, it is a tragedy.

2. symptom
NDMC21:~ # su - sshusr -c "ls";echo $? bin breeze check.sh Documents ideploy_file_history nohup.out public_html 1

We can see that, normally, the last $? 0 is returned.

3. Problem Analysis

In response to this problem, I submitted a case to SuSE and collected various logs, or even strace logs.

I think this problem has not existed before. It has only recently appeared. It should have a great relationship with the recent security reinforcement. So I asked the security reinforcement brothers to sort out all the operations on the OS layer.

The result is that the/etc/security directory permission is modified, and the/etc/security-original permission: 755. After security reinforcement, the permission is changed to 600.

I tested on several hosts, and all of them are OK:

NDMC21:~ # ls -ld /etc/security/ drw------- 2 root root 368 Jul 12 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: http://blog.csdn.net/hw_libo/article/details/38979791
-- Bosco QQ: 375612082
---- END ----
Bytes -------------------------------------------------------------------------------------------------------
All rights reserved. reprinted articles are allowed, but source addresses must be indicated by links. Otherwise, the documents will be held legally responsible!

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.