Provide a local guest user.
This commit is contained in:
parent
ee85c41483
commit
e48c761935
7 changed files with 151 additions and 97 deletions
|
@ -45,9 +45,12 @@
|
|||
mirror_dvdcss: "{{ vault_mirror_dvdcss }}" ## http://livebox.example.org/libdvdcss/
|
||||
|
||||
rsyncsecret: "{{ vault_rsyncsecret }}"
|
||||
keys2deploy: "{{ vault_keys2deploy }}" ## ['ssh-ed25519 AAAAC…uYlnS0', 'ssh-ed25519 AAAA…KTM']
|
||||
|
||||
ssid: "{{ vault_ssid }}"
|
||||
wifipasswd: "{{ vault_wifipasswd }}"
|
||||
keys2deploy: "{{ vault_keys2deploy }}" ## ['ssh-ed25519 AAAAC…uYlnS0', 'ssh-ed25519 AAAA…KTM']
|
||||
localuser: "{{ vault_localuser }}"
|
||||
localuser_pwd: "{{ vault_localuser_pwd }}"
|
||||
|
||||
## Use grub-mkpasswd-pbkdf2 to calculate the password hash:
|
||||
grub_pwd: "{{ vault_grub_pwd }}"
|
||||
|
@ -72,6 +75,7 @@
|
|||
- lmn_printer
|
||||
- kerberize
|
||||
- lmn_wlan
|
||||
- lmn_localuser
|
||||
- lmn_security
|
||||
|
||||
tasks:
|
||||
|
|
196
lmn-vault
196
lmn-vault
|
@ -1,90 +1,108 @@
|
|||
$ANSIBLE_VAULT;1.1;AES256
|
||||
32373033346534336537616432383831656137373934646130373730643462353434396336633933
|
||||
6334333739313565333264333635343130396138333062640a646433353666306666363332373135
|
||||
37363762376332373836393434393336303932626438613236366438376535643836343239356134
|
||||
6231316166653936310a616632333539343462383265393432336133653238643465623536333434
|
||||
39336536623730363339663332653938333965653165396437636138393064326161336266343031
|
||||
32613336323461636162356136306162343636333033613735633866366165616539306563646564
|
||||
30343731653839323463343434633430393631353662613030316236343261323232613839326539
|
||||
63353062376131303264306361623638656662383066393831623164363238336239633731663766
|
||||
37303563356663353663323663383065333135656562346636376665343565366264613837303433
|
||||
30306166393239663235336433356239343765623736316331353165663931356434326266363864
|
||||
37383766353534336630393864633933303363633239633639326134663766303738323237663132
|
||||
62616435306434333166333563366132323432613334356436666630653862643165386335393161
|
||||
61643831656361633262653764343336343963373239343964663730663265666539656533323163
|
||||
62656630396332313263333463303435326632653164636365623930643163363464656637356238
|
||||
61383466343130353933383539633338366265396361323963393839366234626538623731383131
|
||||
31383538653962326533663130363163353839343837626333356466326438623139383936643830
|
||||
63623631363038643737653238373663613239653133383161323364393165373866636634626132
|
||||
65666634396539393736393637323332333538303466373231343134373965323761663030616330
|
||||
32306131353764626465663231376637323766313733623738613336393033383862366265653830
|
||||
61356338353732633139346664373834613935346135623934306665323839326130316538623436
|
||||
39353164313638333564373265613532326364306336613163646531366238663231633136353562
|
||||
61383635636437623864653062626565326338626665646439663961393161356635626336356439
|
||||
62373930653337326239323938663166303531353731646334613134333239623434316232343438
|
||||
31366139336365326137363034353638323633323463316130366630346533376665626233353531
|
||||
35326332363133616461653339653637633337643134623137313330356561613535633139316339
|
||||
38393463363732646635386231333962303337353562653265623530616537653132333735626265
|
||||
63623138346337373665316138376234383235313536326232653866346637303066366435343836
|
||||
38313561373039356161383733323432636438303130306239366630663163386235326463636130
|
||||
34336338313663383034343364616462646239636430303635343637653436623735643665303233
|
||||
63396539646431396263633833613862366238306638333533666534326334306163346133666138
|
||||
31393830643938656562373732643563656535383831316536396238613633356366353962393136
|
||||
32666664633361633261313033633138383231303236383235643632666539303133383763343832
|
||||
65623832323165366461666463623835396638386536366464623336343964333666333736353562
|
||||
62356434326431316163613037623231383163393263656162306132326666323639333066313734
|
||||
32656563633961663736636163656131663961356461323230623236383432393238656264393766
|
||||
62643732323765363163383462326536343662376136313165393163333263633365663036626539
|
||||
37316565663065366336366235343666393732303631336661323436336666313135623962666132
|
||||
66346333323535396235323264353562333264353137376461653332623635616133383061393037
|
||||
33633362396461303634346436666662633631663630623437303061343464396661616562626138
|
||||
63356533336336373433623137626461363831306564626230396238626436663866303931313339
|
||||
65306465633739346436343539646235653934666430623939323935636163646266323031323333
|
||||
62316632663030376663656131346332633261323266303339396537326434393935336364326165
|
||||
31343161643031376134366636333761373735346334333532343564303061623864653661306637
|
||||
32363933316433383664313237623561343638363262333261323638393939643232623365323836
|
||||
30323633316336323862363663653632393866306136333634303265396133663138646563653836
|
||||
61303234646564616566646536343533313162323564646337373237656139383862616365626462
|
||||
61346230613533313763663364356462316633623662323661623765626464373730393530356466
|
||||
39336364633333366562316536333561376165363131313639386635353864323964383363316666
|
||||
64636363316265653761323833613234396533303563633539336438626561363833313162356331
|
||||
66376437636635353432613865333430653135306565656233323330383439656438653738616630
|
||||
38653034356662656364666462323464303134616231643862656565393839613263333539343834
|
||||
30646461613861343262363263373662313931353530366131386631633735663839336437303236
|
||||
32393233643238313531383363366439363730613839643262653037373230343333623862333835
|
||||
32323231376263643333356239386232363135333862343337636466383833626561393739373964
|
||||
30653134663833333661363737663335323331353161333963393039656365343937346634343736
|
||||
30393734336663353063663539623965626638326664633232393732333239306663396631393362
|
||||
39363137336530623662323533363637656132323736366233323331373636366237616130643330
|
||||
35633738323564343535383231346433386261656230303164343630356139613430326165323234
|
||||
34613937613338646632643231343035343334383231366264336265363434366261383838316361
|
||||
37316137373437623263383932393665316535373039323131326264343661376531313764316363
|
||||
64663837353864653937326331363937626463623730323931363462353564313231366636653730
|
||||
61353961633065313364343437383737386361323935623133383734316361333261653462616465
|
||||
62353831393764666538373266363963363632363932373565326437656336643033663139383537
|
||||
66326631313634616661386262343263373262646436343232613762656330613634343966613965
|
||||
62346566613930633234633335636239383533396264616630623232343663383964333065386335
|
||||
36643661363736343361343838306638366133303431356539373765396462643331646366626636
|
||||
35613432323534613832623266633462306532383166666662363635383162386234663030353062
|
||||
62363732363136626432656237613739326137616632643561326335366264633338653130646434
|
||||
37336663396538303362343862653565303338656339646432343231356634613332366365333730
|
||||
61393238323630663134303032616234643762393863646131636632633832663339373363326335
|
||||
61643666363362376536653435666133333263383264383935656639626535626562666465353562
|
||||
33666637383066643138663963343232663065303362353930303263343063313637653535323565
|
||||
30616636376365343063303537306135663462636131336664653034393732343932376330383163
|
||||
64343864363064643638323233623066613034326465636662626639643133643333656666653261
|
||||
39623337376538396438386638633330623034316163363932663662653239363132376139333835
|
||||
61343532623563353266386339303366383039333832303433623964656533346564633261353433
|
||||
39383761313333383834376230353063643665326161643962386330323461656432353763343561
|
||||
61353462373234633764333033656131626664376137326162326134316261333939353735363237
|
||||
63666632326363613631653263613632366466346330396664366631363537363533323961616461
|
||||
63383438333831396162366365313735313833633036303662653961303265663730313933616130
|
||||
66333732393234366337636264306166343430353663666666393434316362653530306266373566
|
||||
38643066353262616462626338393335623961333233323038633239333664636263653434366436
|
||||
65636466656264303763663837316666393339356566386563323137383336633331623366336361
|
||||
32633035353731393234363261353431386339663632616133383134333537366239623731373439
|
||||
38626163303462373334653663343139323865363638323666643539316664396335666237393863
|
||||
33316233393336313537323533613963613539323062323962643938656230376463653734353763
|
||||
30373265646161333862353231663963346533633464633639626362626235653136663036656265
|
||||
31343236366663643137373435353261626638373733623732323366326536616631636434343861
|
||||
6532
|
||||
65633363646535646163353331353934343961306136663461633362323362643537386162346435
|
||||
6161306230316364656463313530376230313561653964650a333737336431326663366631666663
|
||||
61366333623231316336353362666130653838663233306334353734316338336334313630653339
|
||||
6335306166653434320a396232363732346239386533366236623332356231633536346136333666
|
||||
66316630313133646537373139636533313638663336343366623464313764636161326432653132
|
||||
38303864373736643932383436383331376139333439666166613463346636306235623961663530
|
||||
31616339623538663332633539376366663739633831633361363961323039386237323830393734
|
||||
36383734643134643530313631643561346266353665646563306334303339323231323766353334
|
||||
33353830336131653831636564383635356439363433663133663536653764653133666262303432
|
||||
38633034363764396461356130323531616561613734333039393836333338346235633838663330
|
||||
30646665656564646561663335643331633562623937623337353933623530363166646666363436
|
||||
35356434663830306634396633626139613632363364333163366539396539366434333331313438
|
||||
63353163386361396233643832313535383261366363333863383363353835633032376133373361
|
||||
61373535356535383836323438626265646330303238636632393034396133363131663031353933
|
||||
37393865393336313264393231643831623566666133343836633635353861613836386661376238
|
||||
39353461623839323532373064326238623961356466613130323535653437626364303261623537
|
||||
35306666373163646134666232356564623764353630333166326261393230623663363266336532
|
||||
35306564396430626639623461643035363933346435646363633464636432323462353766363639
|
||||
63346464396563656463383961623234366162666236646465336535343234376534616363363661
|
||||
64366134356362613535343835643538656333363935313865383436303230373634313166333566
|
||||
33643962623963356139396366316563623835313265656461636665396361336237353162646236
|
||||
38333661323765303932363237383939363336623765376538346538623836373539373339326435
|
||||
63656263343862356363616636366461313766363365636339336439333135326633343935653739
|
||||
63623839343338616336626163623261613062643433333331656230303138313037336536303638
|
||||
37643639336633386239366463383130623637633938313534323066643930313931313965313562
|
||||
66386434303964646363346634393230313132383764323635313430336565343837653536336238
|
||||
31303937636165393939653965303766653937376639656333643636623334346261666432336235
|
||||
64326366656635303635666161333231323530376236303238336663656562353132373265396434
|
||||
63663431626664626130333765346430633061333238363033343737633766633663633266363835
|
||||
35616533336666353033316462643732363565663162623630313462663761363333623663336163
|
||||
31626461663435303435663161626134343535383832366430653036323037343533356230386438
|
||||
34303335666663373638323761303135646330626566373065666130393863666539303037376231
|
||||
61643832633463323831623866333432353734313863643235386333396538383531303434376536
|
||||
65376336653864636230643861616530333666623036393435333237343137316463613730633066
|
||||
61346535356461653734396661643332323666393631313133353333666137613035346237313362
|
||||
65363433393066346131323733363034303031326563343161323366343866336338333832343832
|
||||
61633762323962393531313164313232356630333935623662383639363336393165343636393033
|
||||
34656466636632316365383038613130373535393532646136303063376431323963653163623665
|
||||
37353765616633303134346364643564613136633165396162343231626634353831373638656138
|
||||
34336536653533326661366332363239626233346436613738626339643433323438356139633762
|
||||
66613937613830306530646239363834613533346432376463663230363432343165353233643436
|
||||
39666233633266636136383335386539383263356534353563316365613336363965633039396430
|
||||
62376339396233653864373031353436633333666636643739313766643037306463323235363732
|
||||
38356630623739303761303133366436333536363131663633376566643030643334353137646436
|
||||
30666634346232656237363935666337393332333031353534646137373464326237353731303635
|
||||
66663461383932613333653665343361393161306462386362643562663861363238636633363231
|
||||
31666662613266333832343639376564363865643336373961653334656630313939353762623765
|
||||
64633964643332356562623061376335666566383539333334303964636137313539373039623532
|
||||
38373763626261316662333766613362633063653062363730383365323839386365373830663632
|
||||
34623031363266333461396164613433306338313830373564626439336662303365343335636164
|
||||
37373238656238646437636237366335623039656536323732386635633233336230346230336631
|
||||
63646238376232346630353565373534623034313639386539366662336534323231626136653436
|
||||
39613165336464333433333862333331613761323263636337336231353733373632313530636266
|
||||
30343233663161306166623033666664336161613664326636336533616335316462646539663438
|
||||
38316533646161656335333938343866623865313235646265373565323862356438383339353263
|
||||
37646431643935303965326132323131346231616262313964643736393334656233333864646261
|
||||
66353666303666656535326266343262306137633139303734613965333232633766326437333638
|
||||
33323061623032326563626132383935626230343030303337663530356333316533346164326461
|
||||
39666239303439343135613930363238356531356536333535396238366130663565663332323537
|
||||
30346234386166343332353132623036383732336166626662616666663539316161373934333030
|
||||
64316539376561613937666562656635343165323636636433656638303031373935616435646332
|
||||
63393039613466383034313037383063313830616563646233306164353439653832313463393566
|
||||
36353162353365653065386532333233363864626339383232313264333835366334363564313165
|
||||
63326135393432636634376534356665633733316133373666366337316566303634653637363466
|
||||
63623761623032393361393630613036346637356465643838393366393966373035333861623434
|
||||
63623835383132623766366639313837323539333933346165666138626139623965373962663835
|
||||
62643661616565353138343262323366653330366164313031623861663234353966383737386664
|
||||
30333564613631643762613932396666653566323536353961353933376262323739653338383538
|
||||
34666231616635333866306535393730313837346638393665316563323538386366323630383334
|
||||
32303361383231313863346166653233616364333736346264393836643935373065346438633138
|
||||
64323636623066303537373762303932303963303430383839656361386437646564383937333239
|
||||
64306238663130666234626537303466383162316230373633373766346338323865616435653838
|
||||
30613435356337613261373330323536646333376333366531326165383336623735353834643337
|
||||
32386561653035376663633062373133303036363133303564636461313235373030623337326237
|
||||
36666462353337373437326236623531366564323065623530633663363866373364373536653232
|
||||
30633634376336313366376161316633323238313261616233316339343230306131643531626163
|
||||
38303632653432643436626339373536616366653062613739666233613638626133353632633739
|
||||
61663230656366376537346434303266303263663064303932383035333764633135376236316232
|
||||
33626566333030346562613531313534326564383130396366353664616439323465616165323865
|
||||
65643663643633326435613565346132313866633932636561326536643138643137313836613062
|
||||
62313930663338616362336231643831316130643736633566303565626434623666633762643935
|
||||
61343633386134373935376339393965333666383731623832373936613764376361653737333236
|
||||
65663666353736366266316233646536343763633163383539306364383566383131333530633833
|
||||
37666639643663363531643930656332633030373531323334663632653363623936346634626531
|
||||
35636535646462623939303965383661346161326231303031346136613462313062303233653633
|
||||
31333237333331643138663530393537323231653637363032613133616130626333343739666164
|
||||
32343164363965643335646165343632626161373638343062656639653461653637326238303865
|
||||
36663830323066363562626666306431316165313265356139313033613065326461363963316633
|
||||
65306261633233373066393539326138313238656663303334626362313564393637313930616266
|
||||
33366137643163343933383962303539386131623063616632323831306230316264356336396338
|
||||
64623931333161336631313163356637336562323738336638363831363064363034636435376538
|
||||
35636166303630663466306630383432633030363762323363616562636135376566306630323065
|
||||
33303333323563633533653932653434623636303966343466336633303537393137336439386530
|
||||
39666431383636646634376332653131353465633664316266383835373332303936653936363737
|
||||
62393038646434623265663730653938646438343336396537316436633837383862353839386464
|
||||
33376264353537626231393366666139343833363135646233633638666234383566383934323732
|
||||
62313031323534356233623932623663346632646464323566623636333433333664313130383561
|
||||
33333231346435323266336261623665336630333166633561363963376439323736623362383030
|
||||
38393138353337383466366334373130393633393331393632666435373737306237383562343235
|
||||
35656163343939626130353537393032643732613631313233366637303663653635306539383430
|
||||
36333465306539613935643131393266366361313361313832313630373065653031663564663535
|
||||
35343430373061313061616164363530373731666239653130613731323734373136323736313161
|
||||
32613430376136656337646563646365356466616539613337393737356662646530386133646562
|
||||
38633732396338373361326338323862326138666461306264353137316532636564626230313635
|
||||
38316435363965343035303363353831646439666363363130656364636532656430633135383163
|
||||
66656532353662616134393439666561616436333463343962393739326337323965366165633963
|
||||
383861353830666365343437396238366138
|
||||
|
|
28
roles/lmn_localuser/tasks/main.yml
Normal file
28
roles/lmn_localuser/tasks/main.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
- name: Mount tmpfs on /home/{{ localuser }}
|
||||
ansible.posix.mount:
|
||||
name: /home/{{ localuser }}
|
||||
src: tmpfs
|
||||
fstype: tmpfs
|
||||
opts: uid=1001,gid=1001,mode=755,size=4G
|
||||
state: mounted
|
||||
|
||||
- name: Add local guest user
|
||||
ansible.builtin.user:
|
||||
name: "{{ localuser }}"
|
||||
comment: "Local Guest User,,,"
|
||||
shell: /bin/bash
|
||||
uid: 1001
|
||||
password_expire_min: 99999
|
||||
createhome: false
|
||||
password: "{{ localuser_pwd }}"
|
||||
|
||||
- name: Prepare generator for local guest user
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/systemd/user-environment-generators/60-guest-user.sh
|
||||
content: |
|
||||
#!/usr/bin/bash
|
||||
set -eu
|
||||
[[ "$UID" -ne 1001 ]] && exit 0
|
||||
cp -r -n /etc/skel/.* "$HOME"
|
||||
mode: "0755"
|
|
@ -19,7 +19,7 @@
|
|||
path="{{ web_dav }}"
|
||||
mountpoint="/lmn/media/%(USER)/nextcloud"
|
||||
options="username=%(USER),nosuid,nodev,uid=%(USER),gid=1010,grpid,file_mode=0770,dir_mode=0770,forceuid,forcegid"
|
||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>virti</user></or></not>
|
||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>{{ localuser }}</user></or></not>
|
||||
</volume>
|
||||
insertafter: "<!-- Volume definitions -->"
|
||||
when: web_dav is defined and web_dav | length > 0
|
||||
|
@ -35,7 +35,7 @@
|
|||
path="{{ smb_share }}"
|
||||
mountpoint="/srv/samba/schools/default-school"
|
||||
options="sec=krb5i,cruid=%(USERUID),user=%(USER),gid=1010,file_mode=0770,dir_mode=0770,mfsymlinks,nobrl"
|
||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>virti</user></or></not>
|
||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>{{ localuser }}</user></or></not>
|
||||
</volume>
|
||||
insertafter: "<!-- Volume definitions -->"
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
path="sysvol/"
|
||||
mountpoint="/srv/samba/%(USER)/sysvol"
|
||||
options="sec=krb5i,cruid=%(USERUID),user=%(USER),gid=1010,file_mode=0770,dir_mode=0770,mfsymlinks"
|
||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>virti</user></or></not>
|
||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>{{ localuser }}</user></or></not>
|
||||
</volume>
|
||||
insertafter: "<!-- Volume definitions -->"
|
||||
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
path="~"
|
||||
mountpoint="/lmn/media/%(USER)/home"
|
||||
options="bind"
|
||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>virti</user></or></not>
|
||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>{{ localuser }}</user></or></not>
|
||||
</volume>
|
||||
<volume
|
||||
path="/srv/samba/schools/default-school/share"
|
||||
mountpoint="/lmn/media/%(USER)/share"
|
||||
options="bind"
|
||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>virti</user></or></not>
|
||||
><not><or><user>root</user><user>ansible</user><user>Debian-gdm</user><user>sddm</user><user>{{ localuser }}</user></or></not>
|
||||
</volume>
|
||||
insertafter: "<!-- END ANSIBLE MANAGED BLOCK .* -->"
|
||||
|
||||
|
|
|
@ -13,11 +13,15 @@
|
|||
psk: "{{ wifipasswd }}"
|
||||
autoconnect: true
|
||||
state: present
|
||||
when: not run_in_installer|default(false)|bool
|
||||
when: |
|
||||
not run_in_installer|default(false)|bool and
|
||||
ansible_interfaces | select('search', 'wl.+') | first is defined
|
||||
|
||||
- name: Provide WLAN config during installation
|
||||
template:
|
||||
src: ssid.nmconnection.j2
|
||||
dest: "/etc/NetworkManager/system-connections/{{ ssid }}.nmconnection"
|
||||
mode: '0600'
|
||||
when: run_in_installer|default(false)|bool
|
||||
when: |
|
||||
run_in_installer|default(false)|bool and
|
||||
ansible_interfaces | select('search', 'wl.+') | first is defined
|
||||
|
|
Loading…
Add table
Reference in a new issue