Unix使用者登陸shell控制檔案(轉)
Unix使用者登陸shell控制檔案(轉)[@more@]幾中常見shell在使用者目錄下的控制檔案
1)korn shell (ksh) - .profile .kshrc
2)bourne shell (sh) - .profile
3)c shell (csh) - .cshrc .login
4)bash shell (bash) - .bash_profile .bash_login .profile
在/etc/skel下,儲存了使用者的shell的模版檔案。用admintool建立使用者時系統不會將模版檔案複製到使用者主目錄,而用useradd命令時系統會將相應使用者設立了的模板複製到使用者主目錄並改名為相應的配置檔案,如果想改變環境,修改這個檔案就可以了.
root的配置檔案在/下,如果沒有,使用者可以自己建立.其他使用者的配置檔案在使用者登陸目錄下.
使用者登陸會先讀系統標準配置檔案,然後讀自己目錄下的檔案,如果使用者設定和預設不同,就改變值,如果使用者沒有設定,就用預設值.
例如:bash進的讀取順序: $HOME/.profile-->/etc/profile
bash is a bit different from sh.
whenever the user log in the system, bash will look for .bash_profile; if it doesn't exist, it will look for bash_login; if it still doesn't exist, then it will look for .profile. if it can find none of them, finally it uses /etc/profile.
of course, those files are under ${HOME} except /etc/profile.
1)korn shell (ksh) - .profile .kshrc
2)bourne shell (sh) - .profile
3)c shell (csh) - .cshrc .login
4)bash shell (bash) - .bash_profile .bash_login .profile
在/etc/skel下,儲存了使用者的shell的模版檔案。用admintool建立使用者時系統不會將模版檔案複製到使用者主目錄,而用useradd命令時系統會將相應使用者設立了的模板複製到使用者主目錄並改名為相應的配置檔案,如果想改變環境,修改這個檔案就可以了.
root的配置檔案在/下,如果沒有,使用者可以自己建立.其他使用者的配置檔案在使用者登陸目錄下.
使用者登陸會先讀系統標準配置檔案,然後讀自己目錄下的檔案,如果使用者設定和預設不同,就改變值,如果使用者沒有設定,就用預設值.
例如:bash進的讀取順序: $HOME/.profile-->/etc/profile
bash is a bit different from sh.
whenever the user log in the system, bash will look for .bash_profile; if it doesn't exist, it will look for bash_login; if it still doesn't exist, then it will look for .profile. if it can find none of them, finally it uses /etc/profile.
of course, those files are under ${HOME} except /etc/profile.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10617542/viewspace-946063/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- trace 檔案產生過多,使用者不能登陸
- koa2+vue實現登陸以及是否登陸控制Vue
- Linux/Unix shell 指令碼清除歸檔日誌檔案Linux指令碼
- shell檢測檔案是windows格式還是unixWindows
- unix口令檔案介紹(轉)
- UNIX的檔案處理(轉)
- UNIX 中的檔案切割(轉)
- unix下複製檔案(轉)
- 如何檢視某個Linux, Unix登入使用者使用的哪個shell (k shell, b shell, c shell , /sbiLinux
- 如何檢視某個Linux, Unix登入使用者使用的哪個shell (k shell, b shell, c shell , /sbin/sh)Linux
- QQ使用者登陸介面
- unix freebsd 配製檔案(轉)
- 轉儲 控制檔案
- Unix/ELF檔案格式及病毒分析(轉)
- Unix檔案安全檢查利器- Tripwire(轉)
- UNIX檔案的SUID/SGID(轉)UI
- Unix/ELF檔案格式及病毒分析 (轉)
- 控制檔案詳解(轉)
- Web訪問登陸過濾器控制Web過濾器
- unix檔案操作
- 在shell提示下操作檔案(轉)
- Unix下常見shell簡介(轉)
- ssh自動登陸和scp自動拷貝檔案
- 提升 UNIX 中檔案系統使用效率(轉)
- UNIX系統下各檔案的作用(轉)
- 使用者登陸註冊【JDBC版】JDBC
- django限制使用者重複登陸Django
- ssh只能遠端登陸到普通使用者,不能以root遠端登陸
- 【控制檔案】映象控制檔案
- linux 本地賬號密碼無法登陸(shell可以登入),一直返回 登陸的login介面Linux密碼
- ORACLE控制檔案的重建 (轉)Oracle
- win10系統登陸wegame提示使用者賬戶控制怎麼辦Win10GAM
- SSH安全登陸原理:密碼登陸與公鑰登陸密碼
- Linux使用者密碼後不能登陸(回到原登陸狀態)問題Linux密碼
- 設定了hosts檔案不能登陸自己的blog了!
- 遷移和移動 UNIX 檔案系統(轉)
- Unix與FreeBSD下檔案的屬性(轉)
- Nuxt 實現使用者鑑權登陸UX