Prepend full standard PATH for restricted SSH environments
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
# Gather system information from a remote server
|
||||
# Output format: [section] headers followed by key=value pairs
|
||||
|
||||
# Ensure sbin paths are available (not always in PATH for non-root users)
|
||||
export PATH="$PATH:/usr/sbin:/usr/local/sbin:/sbin"
|
||||
# Ensure all standard paths are available (restricted SSH may have minimal PATH)
|
||||
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH"
|
||||
|
||||
echo "[system]"
|
||||
echo "hostname=$(hostname)"
|
||||
|
||||
Reference in New Issue
Block a user