activate NetAdm
This commit is contained in:
parent
d3a4363aac
commit
c6431e6628
@ -26,6 +26,7 @@ DefVar $OLD_CREATOR_TAG$
|
||||
DefVar $OLD_RELEASE$
|
||||
|
||||
DefVar $Group$
|
||||
DefVar $NetGroup$
|
||||
DefVar $openvpn_userpasswd$
|
||||
DefVar $UserExists$
|
||||
|
||||
@ -87,6 +88,12 @@ else
|
||||
set $Group$ = takeString(6,$ResultList$)
|
||||
set $Group$ = takeString(1,splitstring($Group$,"\"))
|
||||
|
||||
set $ResultList$ = getOutStreamFromSection("DosInAnIcon_get_netadmin_group")
|
||||
|
||||
set $NetGroup$ = takeString(6,$ResultList$)
|
||||
set $NetGroup$ = takeString(1,splitstring($NetGroup$,"\"))
|
||||
|
||||
|
||||
comment "Check if user exists."
|
||||
comment "If user exists, the password will be altered. Otherwise, the user will be created."
|
||||
set $ResultList2$ = getOutStreamFromSection("DosInAnIcon_checkuser")
|
||||
@ -139,6 +146,10 @@ endif
|
||||
@echo off
|
||||
"%ScriptPath%\ALL\PsGetsid.exe" /accepteula S-1-5-32-544
|
||||
|
||||
[DosInAnIcon_get_netadmin_group]
|
||||
@echo off
|
||||
"%ScriptPath%\ALL\PsGetsid.exe" /accepteula S-1-5-32-556
|
||||
|
||||
[DosInAnIcon_checkuser]
|
||||
@echo off
|
||||
net user openvpn >nul 2>&1 && echo yes || echo no
|
||||
@ -146,6 +157,7 @@ net user openvpn >nul 2>&1 && echo yes || echo no
|
||||
[DosInAnIcon_makeadmin]
|
||||
NET USER openvpn $openvpn_userpasswd$ /ADD /comment:"Local User created by OpenVPN opsi-package" /fullname:"Local User by Opsi OpenVPN" /passwordchg:no /passwordreq:yes /expires:never /active:yes
|
||||
NET LOCALGROUP $Group$ /ADD openvpn
|
||||
NET LOCALGROUP $NetGroup$ /ADD openvpn
|
||||
|
||||
[DosInAnIcon_alter_pw]
|
||||
NET USER openvpn $openvpn_userpasswd$
|
||||
@ -192,7 +204,7 @@ set_subfolder OpenVPN
|
||||
set_link
|
||||
name: OpenVPN GUI
|
||||
target: $InstallDir32$/CPAU.exe
|
||||
parameters: -dec -file $InstallDir32$\openvpn.job
|
||||
parameters: -dec -file "$InstallDir32$\openvpn.job" -lwp
|
||||
working_dir: $InstallDir32$
|
||||
icon_file: $InstallDir32$\icon.ico
|
||||
icon_index:
|
||||
@ -204,7 +216,7 @@ set_subfolder ""
|
||||
set_link
|
||||
name: OpenVPN GUI
|
||||
target: $InstallDir32$/CPAU.exe
|
||||
parameters: -dec -file $InstallDir32$\openvpn.job
|
||||
parameters: -dec -file "$InstallDir32$\openvpn.job" - lwp
|
||||
working_dir: $InstallDir32$
|
||||
icon_file: $InstallDir32$\icon.ico
|
||||
icon_index:
|
||||
@ -217,7 +229,7 @@ set_subfolder OpenVPN
|
||||
set_link
|
||||
name: OpenVPN GUI
|
||||
target: $InstallDir64$/CPAU.exe
|
||||
parameters: -dec -file $InstallDir64$\openvpn.job -lwp
|
||||
parameters: -dec -file "$InstallDir64$\openvpn.job" -lwp
|
||||
working_dir: $InstallDir64$
|
||||
icon_file: $InstallDir64$\icon.ico
|
||||
icon_index:
|
||||
@ -229,7 +241,7 @@ set_subfolder ""
|
||||
set_link
|
||||
name: OpenVPN GUI
|
||||
target: $InstallDir64$/CPAU.exe
|
||||
parameters: -dec -file $InstallDir64$\openvpn.job -lwp
|
||||
parameters: -dec -file "$InstallDir64$\openvpn.job" -lwp
|
||||
working_dir: $InstallDir64$
|
||||
icon_file: $InstallDir64$\icon.ico
|
||||
icon_index:
|
||||
|
Loading…
Reference in New Issue
Block a user