14 Kasım 2019 Perşembe

/etc/shadow Dosyası

Giriş
Eskiden şifreler /etc/passwd dosyası içinde saklanırdı. 1990'lardan itibaren şifreler /etc/shadow dosyasında hash'lenerek saklanmaya başladılar. Açıklaması şöyle.
Password shadowing first appeared in Unix systems with the development of SunOS in the mid-1980s,[10] System V Release 3.2 in 1988 and BSD4.3 Reno in 1990. 
Bir başka açıklama şöyle.
Originally the password hash was in the publicly-readable file /etc/passwd. Putting the hash in a separate file /etc/shadow that only the system (and the system administrator) was one of the many innovations to come from Sun, dating from around SunOS 4 in the mid-1980s. It spread out gradually to other Unix variants (partly via the third party shadow suite whose descendent is still used on Linux today) and wasn't available everywhere until the mid-1990s or so.
Gerekçe olarak ta passwd dosyasının okunabilir olmasının gerekmesi gösteriliyor. Okunabilir olunca şifreler kırılmaya daha açık hale geliyordu.

Permission
Bu dosyaya haklar 000 olmalı. Açıklaması şöyle.
The idea behind setting /etc/shadow permissions to 000 is to protect that file from being accessed by daemons, even when running as root, by ensuring that access is controlled by the DAC_OVERRIDE capability.
Açıklaması şöyle.
000 only grants access to processes with the DAC_OVERRIDE capability.
Format
shadow dosyasının formatı şöyle. type = 1 ise MD5 hash kullanıldığını belirtir.
$ type $ salt $ hash
Şifre Sütunu
Örnek - * Olması
Şöyle olsun
sys:*:19101:0:99999:7:::
Açıklaması şöyle
That * is where the password hash would be if the user had a password. But * is an invalid password hash, no password will produce it, so there is no password the user could log in with.

Note that if the password hash field was empty, it might allow login without entering a password.


Hiç yorum yok:

Yorum Gönder