Compare commits

..

No commits in common. "842c32a14e43a9c712489b941afc7f2309453a3f" and "58feedfcf7c5706b5fe985d0a38833cde59a9f62" have entirely different histories.

View file

@ -1467,28 +1467,14 @@ EOF
eval $SHOPTEXTGLOB eval $SHOPTEXTGLOB
} }
if ${SSHS-false} chuser () {
then [ $(id -u) -gt 0 ] && return
echo declare tsudo u_id="$(id -u $1)"
tsudo () { g_id="$(id -g $1)"
[ $(id -u) -gt 0 ] && return 1 install -o ${u_id} -g ${g_id} -m 0700 /run/user/${u_id}
[ $# -eq 0 ] && return 2 cp ${getbashrcfile} /run/user/${u_id}/.
local u_id="$(id -u $1)" cp ${getvimrcfile} /run/user/${u_id}/.
local g_id="$(id -g $1)"
local b_rc=$(getbashrcfile)
local v_rc=$(getvimrcfile)
install -d -o ${u_id} -g ${g_id} -m 0700 /run/user/${u_id}
local bashrctmp="/tmp/$(basename ${b_rc})"
local vimrctmp="/tmp/$(basename ${v_rc})"
[ -n "${getbashrcfile:-x}" ] && install -o ${u_id} -g ${g_id} -T ${b_rc} "${bashrctmp}"
[ -n "${getvimrcfile:-x}" ] && install -o ${u_id} -g ${g_id} -T ${v_rc} "${vimrctmp}"
sed -i -e 's;\(bashrctmp=\)\(.*$\);\1'${bashrctmp}';' $bashrctmp
sed -i -e 's;\(vimrctmp=\)\(.*$\);\1'${vimrctmp}';' $bashrctmp
sudo -u ${1} /bin/bash --rcfile ${bashrctmp}
} }
fi
#EOF #EOF