« Command line windows » : différence entre les versions

De Banane Atomic
Aller à la navigationAller à la recherche
Ligne 25 : Ligne 25 :
<kode lang='ps'>
<kode lang='ps'>
# save the DACLs of c:\folder\file.ext to c:\folder\acl.txt
# save the DACLs of c:\folder\file.ext to c:\folder\acl.txt
icacls c:\folder\file.ext /save c:\folder\acl.txt /t
icacls c:\folder\file.ext /save c:\folder\acl.txt


# restore the DACLs of c:\folder\file.ext from c:\folder\acl.txt
# restore the DACLs of c:\folder\file.ext from c:\folder\acl.txt
Ligne 33 : Ligne 33 :
icacls c:\folder\file.ext /grant User1:(d,wdac)
icacls c:\folder\file.ext /grant User1:(d,wdac)
</kode>
</kode>
{| class="wikitable wtp"
|+ Basic permissions
! Code
! Description
|-
| F || Full access
|-
| M || Modify access
|-
| RX || Read and execute access
|-
| R || Read-only access
|-
| W || Write-only access
|}

Version du 7 février 2022 à 18:12

Users and groups

Ps.svg
# list local users
net user

# display account information (groups of which he is a member)
net user [username]

# create an account
net user /add [username]
# it prompts the password

# list local groups
net localgroup

# list the users of a group
net localgroup [groupname]

# add a user to a group
net localgroup administrators [username] /add

Access Control Lists

Ps.svg
# save the DACLs of c:\folder\file.ext to c:\folder\acl.txt
icacls c:\folder\file.ext /save c:\folder\acl.txt

# restore the DACLs of c:\folder\file.ext from c:\folder\acl.txt
icacls c:\folder\file.ext /restore c:\folder\acl.txt

# grant to User1 the Delete and Write DAC permissions to c:\folder\file.ext
icacls c:\folder\file.ext /grant User1:(d,wdac)
Basic permissions
Code Description
F Full access
M Modify access
RX Read and execute access
R Read-only access
W Write-only access