Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
643d2eef
Commit
643d2eef
authored
Dec 18, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(auth/installer) force unlocked account, so pam can use standard pam_unix.so
parent
cc05a977
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
auth.inc
src/etc/inc/auth.inc
+3
-3
rc.bootup
src/etc/rc.bootup
+1
-1
No files found.
src/etc/inc/auth.inc
View file @
643d2eef
...
@@ -401,7 +401,7 @@ function local_sync_accounts($verbose = false)
...
@@ -401,7 +401,7 @@ function local_sync_accounts($verbose = false)
}
}
}
}
function
local_user_set
(
&
$user
)
function
local_user_set
(
&
$user
,
$force_unlock
=
false
)
{
{
if
(
empty
(
$user
[
'password'
]))
{
if
(
empty
(
$user
[
'password'
]))
{
log_error
(
sprintf
(
log_error
(
sprintf
(
...
@@ -416,7 +416,7 @@ function local_user_set(&$user)
...
@@ -416,7 +416,7 @@ function local_user_set(&$user)
$user_home
=
"/home/
{
$user_name
}
"
;
$user_home
=
"/home/
{
$user_name
}
"
;
$user_shell
=
'/sbin/nologin'
;
$user_shell
=
'/sbin/nologin'
;
$user_group
=
'nobody'
;
$user_group
=
'nobody'
;
$lock_account
=
'lock'
;
$lock_account
=
$force_unlock
?
'unlock'
:
'lock'
;
@
mkdir
(
'/home'
,
0755
);
@
mkdir
(
'/home'
,
0755
);
...
@@ -430,7 +430,7 @@ function local_user_set(&$user)
...
@@ -430,7 +430,7 @@ function local_user_set(&$user)
$user_shell
=
'/bin/csh'
;
$user_shell
=
'/bin/csh'
;
}
}
/* unlock valid shell users */
/* unlock valid shell users
(only when integrated auth is disabled, our users are locked locally by default)
*/
if
(
!
is_account_disabled
(
$user_name
)
&&
!
is_account_expired
(
$user_name
)
if
(
!
is_account_disabled
(
$user_name
)
&&
!
is_account_expired
(
$user_name
)
&&
!
empty
(
$config
[
'system'
][
'disableintegratedauth'
]))
{
&&
!
empty
(
$config
[
'system'
][
'disableintegratedauth'
]))
{
$lock_account
=
'unlock'
;
$lock_account
=
'unlock'
;
...
...
src/etc/rc.bootup
View file @
643d2eef
...
@@ -189,7 +189,7 @@ if ($setup_installer) {
...
@@ -189,7 +189,7 @@ if ($setup_installer) {
if
(
$root
)
{
if
(
$root
)
{
$root
[
'shell'
]
=
'/usr/local/etc/rc.installer'
;
$root
[
'shell'
]
=
'/usr/local/etc/rc.installer'
;
$root
[
'name'
]
=
'installer'
;
$root
[
'name'
]
=
'installer'
;
local_user_set
(
$root
);
local_user_set
(
$root
,
true
);
mwexec
(
"/usr/local/etc/rc.sshd installer"
);
mwexec
(
"/usr/local/etc/rc.sshd installer"
);
...
...
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