Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
mkimage-profiles
Commits
e543e6dd
Commit
e543e6dd
authored
Jun 24, 2013
by
Michael Shigorin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial net-usershares feature
This is applicable at least to XFCE and MATE based images (plugins for the appropriate file managers are available). NB: basically untested with installers.
parent
8b713854
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
config.mk
features.in/net-usershares/config.mk
+5
-0
85-samba-usershares.sh
...-usershares/rootfs/image-scripts.d/85-samba-usershares.sh
+36
-0
No files found.
features.in/net-usershares/config.mk
0 → 100644
View file @
e543e6dd
# requires thunar-shares-plugin or mate-user-share to make sense
use/net-usershares: use/services use/deflogin
@$(call add,GROUPS,sambashare)
@$(call add,DEFAULT_SERVICES_ENABLE,smb nmb)
@$(call add,THE_PACKAGES,libshell)
features.in/net-usershares/rootfs/image-scripts.d/85-samba-usershares.sh
0 → 100755
View file @
e543e6dd
#!/bin/sh -efu
[
-s
/etc/samba/smb.conf
]
||
exit
0
.
shell-config
USERSHARES_DIR
=
"/var/lib/samba/usershares"
USERSHARES_GROUP
=
"sambashare"
DEFAULT_GROUPS
=
'cdwriter cdrom audio proc radio camera floppy xgrp scanner uucp'
###
GROUPS_FILE
=
"/usr/share/install3/default-groups"
mkdir
-p
"
$USERSHARES_DIR
"
groupadd
-r
"
$USERSHARES_GROUP
"
chown
root:
"
$USERSHARES_GROUP
"
"
$USERSHARES_DIR
"
chmod
1770
"
$USERSHARES_DIR
"
USERSHARES_OPTIONS
=
"# ----------------------- User Shares Options -------------------------
\n\t
usershare path =
$USERSHARES_DIR
\n\t
usershare max shares = 100
\n\t
usershare allow guests = yes
\n\t
usershare owner only = yes"
sed
-i
-e
"
\|
^
\[
global
\]
|a
$USERSHARES_OPTIONS
"
\
-e
"s/workgroup = MYGROUP/workgroup = WORKGROUP/"
\
"/etc/samba/smb.conf"
# Create group file for alterator-users
if
[
!
-s
"
$GROUPS_FILE
"
]
;
then
mkdir
-p
"
${
GROUPS_FILE
%/*
}
"
echo
"
$DEFAULT_GROUPS
"
>
"
$GROUPS_FILE
"
fi
# Add USERSHARES_GROUP to the default groups list.
echo
"
$USERSHARES_GROUP
"
>>
"
$GROUPS_FILE
"
# Permissions for home dir must be 0701
tab
=
"
$(
printf
"
\t
"
)
"
shell_config_set
"/etc/login.defs"
UMASK 076
"
$tab
"
"
$tab
"
# smb and nmb services must be enabled
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment