Ungayitshintsha njani (su) kwenye iAkhawunti yoMsebenzisi ngaphandle kwegama eligqithisiweyo

Ibhlog

Kule khokelo, siza kubonisa indlela yokutshintshela kwenye okanye kwiakhawunti ethile yomsebenzisi ngaphandle kokufuna iphasiwedi. Umzekelo, sineakhawunti yomsebenzisi ebizwa iiposti (okungagqibekanga Iposi ye-PostgreSQL iakhawunti yenkqubo yamandla aphezulu), sifuna wonke umsebenzisi (ngokwethu Iposi ye-PostgreSQL isiseko sedatha kunye nenkqubo yolawulo) kwiqela elibiziweyo iiposti ukutshintshela kwi iiposti akhawunti usebenzisa su umyalelo ngaphandle kokufaka iphasiwedi.



Ngokuzenzekelayo, kuphela ingcambu yomsebenzisi onokutshintshela kwenye iakhawunti yomsebenzisi ngaphandle kokufaka iphasiwedi. Nawuphi na omnye umsebenzisi uya kuyalelwa ukuba angene ngegama eligqithisiweyo leakhawunti yomsebenzisi abatshintshela kuyo (okanye ukuba bayayisebenzisa Umyalelo weSudo , Bayakucelwa ukuba bangenise ipassword yabo), ukuba ababoneleli ngegama elichanekileyo, bafumana ugunyaziso aluphumelanga Impazamo njengoko kubonisiwe kwisikrini esilandelayo.

phendula isikhethi sexesha lendalo

Impazamo yokungqinisisa komsebenzisi



Impazamo yokungqinisisa komsebenzisi

Ungasebenzisa nasiphi na kwezi zisombululo zibini zibonelelwe apha ngezantsi ukusombulula lo mba ungasentla.



1. Sebenzisa iModyuli yokuNgqinisisa ye-PAM

IPAM ( Iimodyuli zokuqinisekisa ezinokutsha ) ziphambili ekuqinisekisweni komsebenzisi kwiinkqubo ezisebenzayo zeLinux. Ukuvumela abasebenzisi kwiqela elithile ukuba batshintshele kwenye iakhawunti yomsebenzisi ngaphandle kwephasiwedi, sinokutshintsha useto lwe-PAM emiselweyo umyalelo wakho kwi /etc/pam.d/su ifayile.

## vim /etc/pam.d/su OR $ sudo vim /etc/pam.d/su

Yongeza oku kulandelayo emva Umbhali anele pam_rootok.so njengoko kubonisiwe kumfanekiso olandelayo.

auth [success=ignore default=1] pam_succeed_if.so user = postgres auth sufficient pam_succeed_if.so use_uid user ingroup postgres

Kuqwalaselo olungentla, umgca wokuqala ujonga ukuba umsebenzisi ekujoliswe kuye ngu iiposti , ukuba injalo, inkonzo ijonga umsebenzisi wangoku, kungenjalo, default=1 umgca weqiwe kwaye amanyathelo okuqinisekisa aqhelekileyo ayenziwa.

auth [success=ignore default=1] pam_succeed_if.so user = postgres

Umgca olandelayo ukhangela ukuba umsebenzisi wangoku ukwelo qela iiposti , ukuba yes, Inkqubo yokungqinisisa ithathwa njengeyimpumelelo kwaye ibuyisa ngokwaneleyo ngenxa yoko. Ngaphandle koko, amanyathelo okuqinisekisa aqhelekileyo ayenziwa.

iiwebhusayithi ezintle ze-anime zeselfowuni
auth sufficient pam_succeed_if.so use_uid user ingroup postgres

#linux iyalela #linux tricks #linux

feedproxy.google.com

Ungayitshintsha njani (su) kwenye iAkhawunti yoMsebenzisi ngaphandle kwegama eligqithisiweyo

Ungayitshintsha njani (su) kwenye iAkhawunti yoMsebenzisi ngaphandle kwegama eligqithisiweyo. Kwesi sikhokelo, siza kubonisa ukuba utshintshela kwenye okanye kwiakhawunti ethile yomsebenzisi ngaphandle kokufuna iphasiwedi.