mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-11-04 01:16:35 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			239 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			239 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/bin/sh
 | 
						|
 | 
						|
if [ $# -ge 1 ]; then
 | 
						|
    if ! id "$1" &>/dev/null; then
 | 
						|
        echo "No such user, give valid username"
 | 
						|
    else
 | 
						|
        USERNAME="$1"
 | 
						|
    fi
 | 
						|
else
 | 
						|
    USERNAME="root"
 | 
						|
fi
 | 
						|
 | 
						|
source /etc/profile
 | 
						|
exec su "$USERNAME" --login
 | 
						|
exit
 | 
						|
 | 
						|
 |