allow makeitso to be re-run
This commit is contained in:
		
							parent
							
								
									ae51e774ae
								
							
						
					
					
						commit
						9e8d93d4ea
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		
							
								
								
									
										7
									
								
								makeitso
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								makeitso
									
										
									
									
									
								
							|  | @ -5,9 +5,12 @@ if [ $# -ne 1 ]; then | |||
|   exit 1 | ||||
| fi | ||||
| 
 | ||||
| #sudo adduser --disabled-login --gecos 'User for AuthorizedKeysCommand' authorizedkeysuser || | ||||
| sudo useradd -c 'User for AuthorizedKeysCommand' -d /home/authorizedkeysuser -m -s/usr/sbin/nologin authorizedkeysuser | ||||
| if [ ! -d /home/authorizedkeysuser ]; then | ||||
|   #sudo adduser --disabled-login --gecos 'User for AuthorizedKeysCommand' authorizedkeysuser || | ||||
|   sudo useradd -c 'User for AuthorizedKeysCommand' -d /home/authorizedkeysuser -m -s/usr/sbin/nologin authorizedkeysuser | ||||
| fi | ||||
| 
 | ||||
| grep -q AuthorizedKeysCommand /etc/ssh/sshd_config || \ | ||||
| sudo sh -c "echo 'Match User $1 | ||||
|   AuthorizedKeysCommand /etc/ssh/get_authorized_keys | ||||
|   AuthorizedKeysCommandUser authorizedkeysuser' >> /etc/ssh/sshd_config" | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue