Fix the parentheses in the recovery script
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
parent
758fc0b828
commit
ac98212fa2
1 changed files with 4 additions and 5 deletions
|
|
@ -14,9 +14,8 @@ if not exist C:\Users\Administrator\.ssh mkdir C:\Users\Administrator\.ssh
|
||||||
REM The user owns their .ssh, so that they can add keys of their own.
|
REM The user owns their .ssh, so that they can add keys of their own.
|
||||||
for /f "tokens=5" %%i in ('findstr /b "root:" C:\msys2\etc\passwd') do set SID=%%i
|
for /f "tokens=5" %%i in ('findstr /b "root:" C:\msys2\etc\passwd') do set SID=%%i
|
||||||
set SID=!SID:*,=!
|
set SID=!SID:*,=!
|
||||||
if defined SID (
|
if not defined SID goto :done
|
||||||
icacls C:\msys2\home\root\.ssh /grant *!SID!:(OI)(CI)F /t
|
icacls C:\msys2\home\root\.ssh /grant *!SID!:(OI)(CI)F /t
|
||||||
icacls C:\msys2\home\root\.ssh /setowner *!SID!
|
icacls C:\msys2\home\root\.ssh /setowner *!SID!
|
||||||
)
|
:done
|
||||||
|
|
||||||
echo The SSH access is back.
|
echo The SSH access is back.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue