Skip to content

pierrefevrier/switch-user-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Switch-user-env

Unix script to load the environment of another unix user without making a call to the su command.
Convenient when accessing a machine via a technical user to project into the environment of another user.

Version actuelle : 1.0.0 (CHANGELOG)

Features:

  • Change current $HOME (to make cd command without args redirect to target $HOME user)
  • Load bash profile of target user (alias, prompt...)

Usage:

# Usage:  
    . ./switch_user_env.sh unix_user  
# Args:  
    name of the unix user that you want to load the bash environment  
# Help:  
    -h  display help
# Code retour:  
    0   execution OK
    1   Error(s) occurs during execution

About

Looks like su, without user switch

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages