Samba jako PDC
Z wiki linux-user
m |
|||
Linia 153: | Linia 153: | ||
sudo apt-get install chkconfig | sudo apt-get install chkconfig | ||
+ | === Inne === | ||
+ | Ciekawym rozwiązaniem jest polecenie '''pdbedit''', którym możemy np wymuszać czas po jakim musi zostać zmienione hasło dla użytkownika, co jaki czas może powtarzać się ostatnio skonfigurowane hasło i wiele innych najciekawsze z nich to | ||
+ | *wymuszenie zmiany hasła dla użytkowników samby co 60 dni | ||
+ | pdbedit -P "maximum password age" -C 518400 #(60dni) | ||
+ | *wypisanie danych o użytkowniku | ||
+ | pdbedit -Lv kowalski | ||
+ | WARNING: The "idmap uid" option is deprecated | ||
+ | WARNING: The "idmap gid" option is deprecated | ||
+ | Server's Role (logon server) NOT ADVISED with domain-level security | ||
+ | Forcing Primary Group to 'Domain Users' for kowalski | ||
+ | Unix username: kowalski | ||
+ | NT username: | ||
+ | Account Flags: [U ] | ||
+ | User SID: S-1-5-21-1251109636-2657097270-4275611531-1003 | ||
+ | Primary Group SID: S-1-5-21-1251109636-2657097270-4275611531-513 | ||
+ | Full Name: Uzytkownik samba | ||
+ | Home Directory: fs-ubuntukowalskiprofile | ||
+ | HomeDir Drive: H: | ||
+ | Logon Script: | ||
+ | Profile Path: | ||
+ | Domain: LINUX | ||
+ | Account desc: | ||
+ | Workstations: | ||
+ | Munged dial: | ||
+ | Logon time: 0 | ||
+ | Logoff time: śro, 06 lut 2036 16:06:39 CET | ||
+ | Kickoff time: śro, 06 lut 2036 16:06:39 CET | ||
+ | Password last set: wto, 26 cze 2012 17:32:57 CEST | ||
+ | Password can change: wto, 26 cze 2012 17:32:57 CEST | ||
+ | Password must change: never | ||
+ | Last bad password : 0 | ||
+ | Bad password count : 0 | ||
+ | Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | ||
+ | *minimalna długość hasła | ||
+ | pdbedit -P "min password length" -C 8 | ||
+ | *co ile zmian haseł, hasło może się powtórzyć | ||
+ | pdbedit -P "password history" -C 4 | ||
+ | *maksymalna ilość błędnych logowań | ||
+ | pdbedit -P "bad lockout attempt" -C 8 | ||
+ | i wiele innych, dla wyjaśnienia | ||
+ | Samba Policy Controls | ||
− | + | NT4 policy Name | |
+ | |||
+ | Samba Policy Name | ||
+ | |||
+ | NT4 Range | ||
+ | |||
+ | Samba Range | ||
+ | |||
+ | Samba Default | ||
+ | |||
+ | Maximum Password Age | ||
+ | |||
+ | maximum password age | ||
+ | |||
+ | 0 - 999 (days) | ||
+ | |||
+ | 0 - 4294967295 (sec) | ||
+ | |||
+ | 4294967295 | ||
+ | |||
+ | Minimum Password Age | ||
+ | |||
+ | minimum password age | ||
+ | |||
+ | 0 - 999 (days) | ||
+ | |||
+ | 0 - 4294967295 (sec) | ||
+ | |||
+ | 0 | ||
+ | |||
+ | Mimimum Password Length | ||
+ | |||
+ | min password length | ||
+ | |||
+ | 1 - 14 (Chars) | ||
+ | |||
+ | 0 - 4294967295 (Chars) | ||
+ | |||
+ | 5 | ||
+ | |||
+ | Password Uniqueness | ||
+ | |||
+ | password history | ||
+ | |||
+ | 0 - 23 (#) | ||
+ | |||
+ | 0 - 4294967295 (#) | ||
+ | |||
+ | 0 | ||
+ | |||
+ | Account Lockout - Reset count after | ||
+ | |||
+ | reset count minutes | ||
+ | |||
+ | 1 - 99998 (min) | ||
+ | |||
+ | 0 - 4294967295 (min) | ||
+ | |||
+ | 30 | ||
+ | |||
+ | Lockout after bad logon attempts | ||
+ | |||
+ | bad lockout attempt | ||
+ | |||
+ | 0 - 998 (#) | ||
+ | |||
+ | 0 - 4294967295 (#) | ||
+ | |||
+ | 0 | ||
+ | |||
+ | *** Not Known *** | ||
+ | |||
+ | disconnect time | ||
+ | |||
+ | TBA | ||
+ | |||
+ | 0 - 4294967295 | ||
+ | |||
+ | 0 | ||
+ | |||
+ | Lockout Duration | ||
+ | |||
+ | lockout duration | ||
+ | |||
+ | 1 - 99998 (min) | ||
+ | |||
+ | 0 - 4294967295 (min) | ||
+ | |||
+ | 30 | ||
+ | |||
+ | Users must log on in order to change password | ||
+ | |||
+ | user must logon to change password | ||
+ | |||
+ | 0/1 | ||
+ | |||
+ | 0 - 4294967295 | ||
+ | |||
+ | 0 | ||
+ | |||
+ | *** Registry Setting *** | ||
+ | |||
+ | refuse machine password change | ||
+ | |||
+ | 0/1 | ||
+ | |||
+ | 0 - 4294967295 | ||
+ | |||
+ | 0 | ||
+ | |||
+ | |||
+ | |||
+ | == Skrypt logon.bat == | ||
Pamiętajmy aby skrypt najlepiej pisać w systemie Windows w związku z tym, że Linux nie używa tzw "powrotu karetki". | Pamiętajmy aby skrypt najlepiej pisać w systemie Windows w związku z tym, że Linux nie używa tzw "powrotu karetki". | ||