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
Anton Palgunov
mkimage-profiles
Commits
c00f508b
You need to sign in or sign up before continuing.
Commit
c00f508b
authored
Oct 20, 2020
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deflogin: Added SPECIAL_USER
Variable SPECIAL_USER must have the following format: user:group:uid:gid:homedir:shell Example: @$(call set,SPEC_USER,user:user:500:500:/home/user:/bin/bash)
parent
1d6f12bf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
regular-vm.mk
conf.d/regular-vm.mk
+2
-1
regular.mk
conf.d/regular.mk
+1
-0
config.mk
features.in/deflogin/config.mk
+1
-0
50-users
features.in/deflogin/rootfs/image-scripts.d/50-users
+11
-1
No files found.
conf.d/regular-vm.mk
View file @
c00f508b
...
...
@@ -58,7 +58,8 @@ vm/regular-jeos-systemd: vm/systemd-net \
mixin/regular-vm-jeos mixin/vm-archdep
@$(call add,THE_PACKAGES,glibc-locales)
vm/regular-jeos-sysv: vm/net mixin/regular-vm-jeos mixin/vm-archdep +power; @:
vm/regular-jeos-sysv: vm/net mixin/regular-vm-jeos mixin/vm-archdep +power
@$(call set,SPEC_USER,officer:officer:64:64:/bin/bash)
vm/regular-builder: vm/regular-jeos-sysv mixin/regular-builder
@$(call set,VM_SIZE,10737418240)
...
...
conf.d/regular.mk
View file @
c00f508b
...
...
@@ -62,6 +62,7 @@ distro/.regular-jeos-base: distro/.regular-bare \
@$(call add,THE_BRANDING,alterator) # just to be cleaned up later on
@$(call add,THE_PACKAGES,apt basesystem dhcpcd vim-console su agetty)
@$(call add,THE_LISTS,openssh)
@$(call set,SPEC_USER,officer:officer:64:64:/bin/bash)
# ...and for somewhat bare distros
distro/.regular-jeos: distro/.regular-jeos-base use/stage2/kms \
...
...
features.in/deflogin/config.mk
View file @
c00f508b
...
...
@@ -6,6 +6,7 @@ use/deflogin:
@$(call xport,ROOTPW)
@$(call xport,USERS)
@$(call xport,GROUPS)
@$(call xport,SPEC_USER)
# some presets
# USERS variable chunk format is "login:passwd:admin:sudo"
...
...
features.in/deflogin/rootfs/image-scripts.d/50-users
View file @
c00f508b
#!/bin/sh
#!/bin/sh
-x
# add regular user(s) assigning passwords and attributes of power
# NB: care that the utilities exist; shadow-utils is warranted
...
...
@@ -34,3 +34,13 @@ set_sudo() {
[
-z
"
$admin
"
]
||
set_admin
"
$login
"
[
-z
"
$sudo
"
]
||
set_sudo
"
$login
"
done
# create special user
[
-z
"
$GLOBAL_SPEC_USER
"
]
||
echo
"
$GLOBAL_SPEC_USER
"
\
|
tr
' '
'\n'
\
|
while
IFS
=
':'
read
login group uid gid homedir shell
;
do
groupadd
-g
$gid
$group
>
/dev/null 2>&1
||
:
useradd
-g
$gid
-u
$uid
-d
$homedir
-s
$shell
$login
>
/dev/null 2>&1
||
:
usermod
-G
$group
$login
||
:
done
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