~/.bashrc 调用 /etc/bashrc 导致在deb10上root的PATH变得和普通用户一样,要改用 /etc/profile 才对。
This commit is contained in:
		
							parent
							
								
									92666a6625
								
							
						
					
					
						commit
						b7030522aa
					
				
							
								
								
									
										4
									
								
								.bashrc
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								.bashrc
									
									
									
									
									
								
							| @ -11,9 +11,9 @@ | |||||||
| # User specific aliases and functions | # User specific aliases and functions | ||||||
| 
 | 
 | ||||||
| # Execute system startup script: | # Execute system startup script: | ||||||
| if [ -f /etc/bashrc ] | if [ -f /etc/profile ] | ||||||
| then | then | ||||||
| 	. /etc/bashrc | 	. /etc/profile | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| # Define primary prompt (default is '$'): | # Define primary prompt (default is '$'): | ||||||
|  | |||||||
| @ -5,7 +5,7 @@ if [ v$1 != v ] | |||||||
| then | then | ||||||
|   NewUser=$1 |   NewUser=$1 | ||||||
| else | else | ||||||
|   read -p "Enter path-to-faronear " NewUser |   read -p "Enter new user name: " NewUser | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| echo "<<< Add a new user" | echo "<<< Add a new user" | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user