Hallo allerseits,
ich war sehr lange am grübeln ob das hier nun das richtige Forum ist, da es sich allerdings wirklich nur um ein Problem des Scripts handelt habe ich mich hierfür entschieden. Sollte dies dennoch das falsche Forum sein tut es mir leid und bitte um Verschiebung. ☺
Also worum es geht:
Ich bin gerade dabei mehrere Clients auf Ubuntu 10.04 umzustellen. Um dies zu realisieren benutze ich einen PXE-Bootserver mit lokalem Repository und Kickstart.
Die Clients sollen sich nach der Installation in einer Windows-Domäne befinden. Samba Winbind habe ich schon erfolgreich an einem bereits installierten Client konfiguriert und wollte diese Schritte nun per Kickstart-Postscript automatisieren.
Das Problem: Kickstart funktioniert einwandfrei. Auch die entsprechenden Programmpakete für Winbind werden installiert.
Allerdings werden die Konfigfiles nicht umgeschrieben. Sie befinden sich nach der Installation noch im "Urzustand".
Ich poste einmal nur den Paket- und Scriptabschnitt meiner ks.cfg Datei: (Kickstart an und für sich läuft ja)
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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | #Pakete auswaehlen %packages @ ubuntu-standard @ xubuntu-desktop krb5-user libpam-krb5 winbind smbclient remmina %post --nochroot echo "Configfiles erstellen..." #resolv.conf cat << EOF > /etc/resolv.conf nameserver xxx.xxx.xxx.xxx nameserver xxx.xxx.xxx.xxx nameserver xxx.xxx.xxx.xxx EOF #hosts cat << EOF > /etc/hosts 127.0.0.1 localhost xxx.xxx.xxx.xxx server.domain.dns server EOF #krb5.conf cat << EOF > /etc/krb5.conf [logging] default = FILE:/var/log/krb5.log [libdefaults] ticket_lifetime = 24000 clock_skew = 300 default_realm = DOMAIN.DNS [realms] DOMAIN.DNS = { kdc = server:88 admin_server = server:464 default_domain = DOMAIN.DNS } [domain_realm] .domain.dns = DOMAIN.DNS domain.dns = DOMAIN.DNS EOF #smb.conf cat << EOF > /etc/samba/smb.conf [global] security = ads realm = DOMAIN.DNS password server = xxx.xxx.xxx.xxx workgroup = DOMAIN idmap uid = 10000-20000 idmap gid = 10000-20000 winbind enum users = yes winbind enum groups = yes winbind cache time = 10 winbind use default domain = yes template homedir = /home/%U template shell = /bin/bash client use spnego = yes client ntlmv2 auth = yes encrypt passwords = yes restrict anonymous = 2 domain master = no local master = no preferred master = no os level = 0 EOF #nsswitch.conf cat << EOF > /etc/nsswitch.conf # /etc/nsswitch.conf # # Example configuration of GNU Name Service Switch functionality. # If you have the `glibc-doc-reference' and `info' packages installed, try: # `info libc "Name Service Switch"' for information about this file. passwd: compat winbind group: compat winbind shadow: compat hosts: files dns networks: files protocols: db files services: db files ethers: db files rpc: db files netgroup: nis EOF #group.conf cat << EOF > /etc/security/group.conf * ; * ; * ; A10000-2400 ; floppy, audio, cdrom, video, usb, plugdev, users EOF #common-account cat << EOF > /etc/pam.d/common-account account sufficient pam_winbind.so account required pam_unix.so EOF #common-auth cat << EOF > /etc/pam.d/common-auth auth required pam_group.so use_first_pass auth sufficient pam_winbind.so auth sufficient pam_unix.so nullok_secure use_first_pass auth required pam_deny.so EOF #common-session cat << EOF > /etc/pam.d/common-session session required pam_unix.so session required pam_mkhomedir.so umask=0022 skel=/etc/skel session optional pam_foreground.so EOF #sudo cat << EOF >/etc/pam.d/sudo @include common-account auth sufficient pam_winbind.so auth sufficient pam_unix.so use_first_pass auth required pam_deny.so EOF /etc/init.d/windbind restart |
Ich bin leider nicht so fit was bash angeht. Könnte es ein Rechteproblem sein? Oder liegt es am Code direkt?
Vielen Dank schon mal für eure Antworten Grüße z0mp