Skip to content

Commit

Permalink
[FIX] Resolve insufficient mount Samba permissions
Browse files Browse the repository at this point in the history
[LINK] 78471  71314
[补充] 需要同步990 和 通用分支
  • Loading branch information
dingjingmaster committed Sep 28, 2021
1 parent 82ffdb7 commit c17fcb4
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions peony-share/peony-share.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
#!/bin/bash

#if [ "$#" -eq 1 ];
#then
# # list samba shared directory
# if [ "$1" == "list" ];
# then
# net usershare list
# fi
#else
# net "$@"
#fi

if [ "$#" -eq 1 ];
then
# list samba shared directory
if [ "$1" == "list" ];
if [[ $(groups $1 | grep "sambashare") != "" ]];
then
net usershare list
# echo "have!!!"
exit 0
else
usermod -a -G sambashare "$1"
fi
else
net "$@"
fi

0 comments on commit c17fcb4

Please sign in to comment.