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
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
bf5fd3f5
Commit
bf5fd3f5
authored
Jun 29, 2012
by
Mikhail Efremov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
features.in/live: Don't use nopasswdlogin group in all cases.
Use it only for gdm and lightdm and only if it is used in a PAM config.
parent
87847ba7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
30-users
features.in/live/live/image-scripts.d/30-users
+1
-3
40-autologin
features.in/live/live/image-scripts.d/40-autologin
+10
-0
No files found.
features.in/live/live/image-scripts.d/30-users
View file @
bf5fd3f5
...
...
@@ -2,8 +2,7 @@
# * reset password for root
# * add user `altlinux' (without password)
NPG
=
"nopasswdlogin"
GRPLIST
=
"users scanner audio radio proc cdrom cdwriter wheel fuse
$NPG
"
GRPLIST
=
"users scanner audio radio proc cdrom cdwriter wheel fuse"
verbose
()
{
...
...
@@ -15,7 +14,6 @@ verbose()
add_user
()
{
verbose
"Add
$1
user"
groupadd
-r
"
$NPG
"
local groups
=
for
g
in
$GRPLIST
;
do
if
groupmod
$g
2>/dev/null
;
then
...
...
features.in/live/live/image-scripts.d/40-autologin
View file @
bf5fd3f5
...
...
@@ -7,6 +7,14 @@ fi
USER
=
altlinux
add_nopasswdlogin_group
()
{
[
-f
"/etc/pam.d/
$1
"
]
&&
egrep
-qs
'^auth.+user[[:blank:]]+ingroup[[:blank:]]+nopasswdlogin'
"/etc/pam.d/
$1
"
&&
groupadd
-r
nopasswdlogin
&&
gpasswd
-a
"
$USER
"
nopasswdlogin
}
## setup runlevel
INITTAB
=
/etc/inittab
if
[
-f
"
$INITTAB
"
]
;
then
...
...
@@ -29,6 +37,7 @@ if [ -f "$LIGHTDM_CONF" ]; then
-e
"s/^#
\(
autologin-user=
\)
.*
$/
\1
$USER
/"
\
-e
"s/^#
\(
autologin-user-timeout=0
\)
/
\1
/"
\
"
$LIGHTDM_CONF
"
add_nopasswdlogin_group lightdm
||
:
fi
## gdm2 autologin
...
...
@@ -36,6 +45,7 @@ GDM_CONF=/etc/X11/gdm/custom.conf
if
[
-f
"
$GDM_CONF
"
]
;
then
sed
-i
-e
'/\[daemon\]/aAutomaticLoginEnable=true\nAutomaticLogin='
$USER
\
"
$GDM_CONF
"
add_nopasswdlogin_group gdm
||
:
fi
## kdm3 autologin
...
...
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