aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/disk-image-builder/nested/image-patches/02-users
blob: 9b7db0969a85e38f400aa867504fd3344dc47ca6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh -e

patch etc/sudoers <<"_EOF"
97a98,100
> 
> csit ALL=(root) NOPASSWD:ALL
> cisco ALL=(root) NOPASSWD:ALL
_EOF

patch etc/passwd <<"_EOF"
10a11,12
> csit:x:1001:1001:CSIT user:/tmp:/bin/sh
> cisco:x:1002:1002:Cisco user:/tmp:/bin/sh
_EOF

patch etc/shadow <<"_EOF"
1c1
< root::10933:0:99999:7:::
---
> root:5pcUkhKEiBBfw:16892:0:99999:7:::
10a11,12
> csit:5pcUkhKEiBBfw:16892:0:99999:7:::
> cisco:5piAVSAyGsbaI:16892:0:99999:7:::
_EOF

patch etc/group <<"_EOF"
27a28,29
> csit:x:1001:
> cisco:x:1002:
_EOF

patch etc/ssh/sshd_config <<"_EOF"
44c44
< #PermitRootLogin prohibit-password
---
> PermitRootLogin yes
_EOF