forked from ukui/peony-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] Resolve insufficient mount Samba permissions
[LINK] 78471 71314 [补充] 需要同步990 和 通用分支
- Loading branch information
1 parent
82ffdb7
commit c17fcb4
Showing
1 changed file
with
16 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|