Bug 21763 - 非交互性登录不加载/etc/bashrc而是加载/etc/login.defs
Summary: 非交互性登录不加载/etc/bashrc而是加载/etc/login.defs
Status: NEW
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: Others (show other bugs) Others
Version: 23.0
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: happy_orange
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-13 16:40 UTC by wangshao7674
Modified: 2025-06-13 16:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wangshao7674 2025-06-13 16:40:58 UTC
Description of problem:
在 /etc/bashrc中配置umask 027,/etc/login.defs配置UMASK 022执行ssh 127.0.0.1 'umask'
获取的值不是027而是027,理论上应该高优先级加载bashrc文件中的环境变量值

Version-Release number of selected component (if applicable):


How reproducible:

在 /etc/bashrc中配置umask 027,/etc/login.defs配置UMASK 022执行ssh 127.0.0.1 'umask'
Steps to Reproduce:
1.
2.
3.

Actual results:
022

Expected results:
027

Additional info:
Comment 1 wangshao7674 2025-06-13 16:41:47 UTC
(In reply to wangshao7674 from comment #0)
> Description of problem:
> 在 /etc/bashrc中配置umask 027,/etc/login.defs配置UMASK 022执行ssh 127.0.0.1 'umask'
> 获取的值不是022而是027,理论上应该高优先级加载bashrc文件中的环境变量值
> 
> Version-Release number of selected component (if applicable):
> 
> 
> How reproducible:
> 
> 在 /etc/bashrc中配置umask 027,/etc/login.defs配置UMASK 022执行ssh 127.0.0.1 'umask'
> Steps to Reproduce:
> 1.
> 2.
> 3.
> 
> Actual results:
> 022
> 
> Expected results:
> 027
> 
> Additional info:
Comment 2 wangshao7674 2025-06-13 16:42:48 UTC
(In reply to wangshao7674 from comment #1)
> (In reply to wangshao7674 from comment #0)
> > Description of problem:
> > 在 /etc/bashrc中配置umask 027,/etc/login.defs配置UMASK 022执行ssh 127.0.0.1 'umask'
> > 获取的值不是027而是022,理论上应该高优先级加载bashrc文件中的环境变量值
> > 
> > Version-Release number of selected component (if applicable):
> > 
> > 
> > How reproducible:
> > 
> > 在 /etc/bashrc中配置umask 027,/etc/login.defs配置UMASK 022执行ssh 127.0.0.1 'umask'
> > Steps to Reproduce:
> > 1.
> > 2.
> > 3.
> > 
> > Actual results:
> > 022
> > 
> > Expected results:
> > 027
> > 
> > Additional info: