useradd 1.24 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#! /bin/sh                                                                      
                                                                                
create_home=0                                                                   
                                                                                
cmdline=""                                                                      
for arg in "$@"; do                                                             
	case "$arg" in                                                          
		-m) create_home=1 ;;                                            
		*) cmdline="$cmdline '$arg'" ;;                                 
	esac                                                                    
done                                                                            
                                                                                
if [ $create_home -ne 1 ]; then                                                 
	cmdline="$cmdline -H"                                                   
fi                                                                              
                                                                                
eval exec adduser $cmdline