Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
NoMADLogin-AD
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
84
Issues
84
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
orchardandgrove-oss
NoMADLogin-AD
Commits
77c19baa
Commit
77c19baa
authored
Dec 05, 2018
by
Joel Rennich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add fix for FV and < 10.14.2
parent
aeedcabb
Pipeline
#39068651
failed with stage
in 27 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
1 deletion
+63
-1
Mechs/CreateUser.swift
Mechs/CreateUser.swift
+62
-0
NoMADLogin-AD/Info.plist
NoMADLogin-AD/Info.plist
+1
-1
No files found.
Mechs/CreateUser.swift
View file @
77c19baa
...
...
@@ -230,6 +230,13 @@ class CreateUser: NoLoMechanism {
let
errorText
=
error
.
localizedDescription
os_log
(
"Unable to add user to administrators group: %{public}@"
,
log
:
createUserLog
,
type
:
.
error
,
errorText
)
}
if
isFdeEnabled
()
==
false
{
if
#available(OSX 10.14, *)
{
addSecureToken
(
shortName
,
pass
)
}
}
}
os_log
(
"User creation complete for: %{public}@"
,
log
:
createUserLog
,
type
:
.
debug
,
shortName
)
...
...
@@ -407,4 +414,59 @@ class CreateUser: NoLoMechanism {
}
}
}
fileprivate
func
addSecureToken
(
_
shortName
:
String
,
_
pass
:
String
?)
{
//MARK: 10.14 fix
// check for 10.14
// check for no existing local users?
// - perhaps looking for diskutil apfs listcryptousers /
// if a user already has a token, this will fail anyway
// - gate behind a pref key?
// attempt to add token to user
os_log
(
"Attempting to add a token to new user."
,
log
:
createUserLog
,
type
:
.
default
)
let
launchPath
=
"/usr/sbin/sysadminctl"
var
args
=
[
"-secureTokenOn"
,
shortName
,
"-password"
,
pass
??
""
,
"-adminUser"
,
shortName
,
"-adminPassword"
,
pass
??
""
]
let
result
=
cliTask
(
launchPath
,
arguments
:
args
,
waitForTermination
:
true
)
os_log
(
"sysdaminctl result: @{public}%"
,
log
:
createUserLog
,
type
:
.
debug
,
result
)
args
=
[
"********"
,
"********"
,
"********"
,
"********"
,
"********"
,
"********"
,
"********"
,
"********"
]
}
fileprivate
func
isFdeEnabled
()
->
Bool
{
// check to see if FV is already running
let
launchPath
=
"/usr/bin/fdesetup"
let
args
=
[
"status"
]
if
cliTask
(
launchPath
,
arguments
:
args
,
waitForTermination
:
true
)
.
contains
(
"FileVault is Off"
)
{
return
false
}
else
{
return
true
}
}
}
NoMADLogin-AD/Info.plist
View file @
77c19baa
...
...
@@ -17,7 +17,7 @@
<key>
CFBundleShortVersionString
</key>
<string>
1.2.2b1
</string>
<key>
CFBundleVersion
</key>
<string>
31
2
</string>
<string>
31
3
</string>
<key>
NSHumanReadableCopyright
</key>
<string>
Copyright © 2018 Orchard
&
Grove. All rights reserved.
</string>
<key>
NSPrincipalClass
</key>
...
...
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