22 lines
		
	
	
		
			610 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			610 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/bin/bash
 | 
						|
###################################
 | 
						|
############ by Sthope ############
 | 
						|
###################################
 | 
						|
 | 
						|
## nano ~/.bashrc
 | 
						|
## and add this to the end of the file: export PATH=$PATH:~/bin
 | 
						|
## sudo chmod +x ~/bin/*;su -l $USER
 | 
						|
 | 
						|
#### USAGE
 | 
						|
# bash -c "$(wget -qLO - https://git.sthope.dev/sthope/sthope-examples/src/branch/master/custom-cmds-in-ubuntu/bin_examples/proxmox_addnewuser)" Username Password
 | 
						|
# 
 | 
						|
 | 
						|
apt-get update
 | 
						|
apt-get upgrade -y 
 | 
						|
apt-get install -y sudo
 | 
						|
 | 
						|
adduser ${0} --gecos "${0},69,69,69" --disabled-password
 | 
						|
echo "${0}:${1}" | chpasswd
 | 
						|
 | 
						|
usermod -aG sudo ${0}
 | 
						|
usermod -aG docker ${0} |