Skip to content
Eternal Center

Eternal Center

  • Single-Node (单节点)
    • System (系统)
    • Service (服务)
    • Database (数据库)
    • Container (容器)
    • Virtualization (虚拟化)
  • Multi-Node (多节点)
    • Cluster (集群)
    • Big Data (大数据)
    • Cloud Computing (云计算)
    • Batch Processing (批量处理)
  • Approach (方式方法)
    • Languages (语言)
    • Ideas (思路)
    • Programing (编程)
    • Project (项目)
  • Eternity (永恒)
    • News (消息)
    • Creations (创作)
    • Classics (经典)
    • Legends (传说)
    • Chronicle (编年史)
    • FNIOS (宇宙公民开源学院)
Posted on March 26, 2025March 26, 2025 by Mingyu Zhu

[排错] Linux 解决使用 authselect apply-changes 命令时报错 “[error] [……] has unexpected content!”

  • 报错代码:
  • 解决方法 (创建新的 authselect 文件):
    • 步骤一:移走原来的 authselect 文件
    • 步骤二:创建新的 authselect 的文件
    • 步骤三:使用新创建的 authselect 文件
    • 步骤四:启用 oddjob 服务
    • 步骤五:启用新的 authselect 文件

报错代码:

[error] [/....../system-auth] has unexpected content!
[error] [/....../password-auth] has unexpected content!
[error] [/....../nsswitch.conf] has unexpected content!
[error] Unexpected changes to the configuration were detected.
[error] Refusing to activate profile unless those changes are removed or overwrite is requested.
Some unexpected changes to the configuration were detected. Use 'select' command instead.

解决方法 (创建新的 authselect 文件):

步骤一:移走原来的 authselect 文件

# mv /etc/authselect/custom/password-policy /etc/authselect/custom/password-policy-backup

步骤二:创建新的 authselect 的文件

# authselect create-profile password-policy -b sssd --symlink-meta --symlink-pam

步骤三:使用新创建的 authselect 文件

# authselect select custom/password-policy with-sudo with-faillock without-nullok with-mkhomedir --force

步骤四:启用 oddjob 服务

# dnf install oddjob ; systemctl enable --now oddjobd.service

步骤五:启用新的 authselect 文件

# authselect apply-changes
CategoriesChinese Post (中文帖子), System (系统), System Login Security (系统登录安全), System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志), System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件), System Security (系统安全), System Setting (系统设置), System Setting Other Debugs (系统设置其它排错), System Setting Others (系统设置其它)

Post navigation

Previous PostPrevious [内容] Shell 脚本中 shift 的作用 (偏移位置变量的值)
Next PostNext [命令] Linux 命令 loginctl 的使用 (查看和管理所有 SSH 登录会话\进程)

Aspiration (愿景):

Everyone can achieve self-achievement and self-happiness fairly

每个人都能公平地实现自我成就和自我幸福

Logo (徽标):

Additional Information (其他信息):

About     Manual     Clone     Contact
Disclaimer     Friendly Links     Donation

关于     手册     克隆     联系
免责声明     友情链接     捐赠

Search Inside Website (站内搜索)

Search Outside Website (站外搜索):

Google         Wikipedia         Bing

Eternal URL (永恒网址):

https://eternity.eternalcenter.com Will be last access method / 将是最后的访问方式

Proudly powered by LNMP Proudly powered by WordPress