Skip to content
Snippets Groups Projects
Commit 76ef84f4 authored by Thiago Abdo's avatar Thiago Abdo
Browse files

Add what usb is from what user


Signed-off-by: default avatarThiago Abdo <tja14@inf.ufpr.br>
parent 282bca8c
Branches
No related tags found
No related merge requests found
...@@ -65,6 +65,10 @@ if [ -z "$users" ]; then ...@@ -65,6 +65,10 @@ if [ -z "$users" ]; then
fi fi
set $users set $users
if [ ! -e "/home/openslx/usb_users" ]; then
mkdir -p /home/openslx/usb_users;
fi
# parse config file until EOF # parse config file until EOF
while (( [ $# -gt 0 ] )); do while (( [ $# -gt 0 ] )); do
# get the respective line for passwd, shadow and group # get the respective line for passwd, shadow and group
...@@ -95,6 +99,8 @@ while (( [ $# -gt 0 ] )); do ...@@ -95,6 +99,8 @@ while (( [ $# -gt 0 ] )); do
# because grep will not find anything # because grep will not find anything
if [ -n "$localID" ] && [ -n "$localGID" ]; then if [ -n "$localID" ] && [ -n "$localGID" ]; then
/opt/openslx/scripts/adduser.sh "$passwdf" "$groupf" "$shadowf" /opt/openslx/scripts/adduser.sh "$passwdf" "$groupf" "$shadowf"
#Add to a file what pendrive this user is from
echo "$mountpath" > "/home/openslx/usb_users/$username"
fi fi
fi fi
done done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment