/etc/passwd, yintoni le fayile kwaye yeyantoni?

Malunga nefayile /etc/passwd

Kwinqaku elilandelayo siza kujonga ngokukhawuleza / njl / njl. Le fayile iya kugcina ulwazi oluyimfuneko olufunekayo ngexesha lokungena kwiinkqubo ze-Gnu/Linux.. Ngamanye amazwi, ulwazi olunxulumene neakhawunti yomsebenzisi luya kugcinwa apho. Ifayile igcina umbhalo ocacileyo, oya kunika ulwazi oluluncedo kwiakhawunti yomsebenzisi ngamnye.

Ifayile / njl / njl Kufuneka ube nemvume yokufunda ngokubanzi, njengoko izinto ezininzi eziluncedo ziyisebenzisa ukunika i-ID kumagama omsebenzisi. Ufikelelo lokubhala kule fayile lulinganiselwe kumsebenzisi ophezulu/ingcambu yeakhawunti.. Ifayile iphethwe yingcambu kwaye ineemvume ezingama 644. Into ethetha ukuba inokuguqulwa kuphela ngengcambu okanye abasebenzisi ngamalungelo e-sudo.

Ukujonga ngokukhawuleza kwifayile /etc/passwd

Igama lefayile lisuka komnye wemisebenzi yalo yokuqala. Oku kuqulathe idatha esetyenziselwa ukungqinisisa amagama ayimfihlo eakhawunti yomsebenzisi. Nangona kunjalo, kwiinkqubo zanamhlanje ze-Unix, ulwazi lwegama lokugqitha luqhele ukugcinwa kwifayile eyahlukileyo, usebenzisa amagama agqithisiweyo esithunzi okanye olunye umiselo lwesiseko sedatha.

Kunokuthiwa ifayile / njl / njl Yingxelo ecacileyo esekwe kwisiseko sedatha, equlethe ulwazi malunga nazo zonke iiakhawunti zabasebenzisi ezifunyenwe kwinkqubo.. Njengoko besitshilo, iphethwe yingcambu, kwaye nangona inokuguqulwa kuphela yingcambu okanye abasebenzisi abanamalungelo e-sudo, iyafundeka nangabanye abasebenzisi kwinkqubo.

Yintoni ifayile /etc/passwd?

Olunye uphawu lokuqaqambisa kukuba yifayile elula ye isicatshulwa se-ascii. Oku yifayile yoqwalaselo equlathe iinkcukacha malunga neeakhawunti zomsebenzisi. Ukuchonga abasebenzisi ngokukodwa kubalulekile kwaye kuyafuneka ngexesha lokungena, kwaye kulapho kanye iinkqubo zeGnu/Linux zisebenzisa khona / njl / njl.

iakhawunti yomsebenzisi

Kule fayile yokubhaliweyo engenanto siza kufumana uluhlu lwee-akhawunti zenkqubo, ukugcina kwi-akhawunti nganye ulwazi oluluncedo olufana ne-ID yomsebenzisi, i-ID yeqela, ulawulo lwasekhaya, iqokobhe nokunye.. Kwakhona, oku kufuneka kube nemvume yokufunda ngokubanzi, njengoko izixhobo ezininzi zomyalelo ziyisebenzisa ukunika i-ID yomsebenzisi kumagama omsebenzisi.

Nangona kunokwenzeka ukongeza nokulawula abasebenzisi ngokuthe ngqo kule fayile, akukhuthazwa ukuba wenze njalo, kuba esi senzo sinokongeza iimpazamo, ezinokuba yingxaki. Endaweni yokwenza ngale ndlela, into yakho kukusebenzisa imiyalelo ekhoyo kulawulo lomsebenzisi.

Yintoni ukusetyenziswa kwale fayile?

Kukho izicwangciso ezininzi ezahlukeneyo zokuqinisekisa ezinokusetyenziswa kwiinkqubo zeGnu/Linux. Esona sikimu sisezantsi sisetyenziswa kakhulu kukwenza uqinisekiso kwiifayile / njl / njl y / njl / isithunzi. KwiFayile / njl / njl uluhlu lwabasebenzisi benkqubo lugcinwa kunye nolwazi olubalulekileyo malunga nabo. Ndiyabulela kule fayile, inkqubo inokuchonga abasebenzisi ngokukodwa, njengoko oku kubalulekile kwaye kuyimfuneko xa uqala iseshoni ehambelanayo ngokuchanekileyo.

Umxholo wefayile / njl / njl imisela ukuba ngubani onokufikelela ngokusemthethweni kwinkqubo kunye nento abanokuyenza kanye ngaphakathi. Ngenxa yesi sizathu, le fayile mhlawumbi inokuthathwa njengomgca wokuqala wokukhusela kwinkqubo yokukhusela ukufikelela okungafunekiyo. Ngesi sizathu, kubalulekile ukuyigcina i-bug kunye ne-glitch simahla.

Ubume befayile /etc/passwd

Kumxholo wale fayile, siya kufumana igama lomsebenzisi, igama lokwenyani, ulwazi lokuchongwa kunye nolwazi olusisiseko lweakhawunti yomsebenzisi ngamnye. Njengoko besitshilo, Le yifayile yokubhaliweyo enongeno olunye ngomgca ngamnye, kwaye nganye kulayini imele iakhawunti yomsebenzisi.

ukuba Jonga umxholo wakho, abasebenzisi banokusebenzisa umhleli wokubhaliweyo okanye umyalelo ofana nolandelayo:

Jonga imixholo ye /etc/passwd

cat /etc/passwd

Umgca ngamnye wefayile / njl / njl iyakuba nemihlaba esixhenxe eyahlulwe ngamachaphaza (:). Ngokuqhelekileyo, umgca wokuqala uchaza ingcambu yomsebenzisi, elandelwa yinkqubo kunye neeakhawunti eziqhelekileyo zomsebenzisi. Amangeno amatsha ayongezwa ekugqibeleni.

/etc/passwd amaxabiso efayile

Okulandelayo siza kubona ukuba yintoni na amaxabiso esiya kuwafumana kwimigca yefayile ithetha ntoni. / njl / njl:

/etc/passwd amaxabiso efayile

 

  1. Igama lomsebenzisi→ EMpuma sesetyenziswa xa umsebenzisi engena. Mayibe phakathi konobumba omnye kunye nama-1 ubude.
  2. password→ Unobumba x uya kubonisa ukuba igama eliyimfihlo elifihliweyo ligcinwe kwifayile / njl / isithunzi.
  3. Isazisi somsebenzisi (UID)→ Umsebenzisi ngamnye unikwe i-ID yomsebenzisi (UID) yodwa kwinkqubo. I-UID 0 igcinelwe ingcambu kwaye i-UIDs 1-99 igcinelwe ezinye ii-akhawunti ezichazwe kwangaphambili. Inkqubo iya kugcinela ezinye ii-UID ukusuka kwi-100 ukuya kwi-999 kulawulo kunye neeakhawunti zenkqubo/amaqela.
  4. I-ID yeqela (IGid)→ Esi sisazisi seqela eliphambili angowalo umsebenzisi (igcinwe kwifayile ye/etc/group).
  5. Ulwazi lomsebenzisi (I-GECOS)→ Apha siya kufumana indawo yezimvo. Kule nto kunokwenzeka ukongeza ulwazi olongezelelweyo malunga nabasebenzisi, njengegama elipheleleyo, inombolo yefowuni, njl.
  6. Ulawulo lwasekhaya→ Apha siya kufumana indlela epheleleyo kuluhlu lwabasebenzisi “lwasekhaya”. Ukuba olu lawulo alukho, ulawulo lomsebenzisi luba /.
  7. Shell→ Le yindlela epheleleyo yeqokobhe (/ ibin / ibash). Nangona isenokungabi yiqokobhe ngolo hlobo. Ukuba iqokobhe limiselwe / sbin / nologin kwaye umsebenzisi uzama ukungena kwindlela ye-Gnu/Linux ngokuthe ngqo, iqokobhe / sbin / nologin izakuvala umdibaniso.

Njengoko sele sitshilo imigca apha ngasentla, ngaphandle kwegama eliyimfihlo, nangawuphi na umhleli wokubhaliweyo okunje «vím»okanye «gedit» kunye «ingcambu» amalungelo sinokutshintsha indlela yokuziphatha kunye noqwalaselo lwabo bonke abasebenzisi abagcinwe kwi «/etc/passwd». Nangona kukwayimfuneko ukunyanzelisa ukuba ukulungiswa kwale fayile akufuneki kwenziwe ngaphandle kwakwimeko ekhethekileyo (ekwazi oko kwenziwayo), kuba ukuba into yonakalisiwe okanye icinyiwe kulawulo, sinokuzifumana sijongene nentlekele, kuba kule fayile ingcambu esisiseko yazo zonke iimvume esizisebenzisayo kwaye siya kuzisebenzisa kwinkqubo.


Umxholo wenqaku uyabambelela kwimigaqo yethu imigaqo yokuziphatha yokuhlela. Ukuxela impazamo cofa apha.

Yiba ngowokuqala ukuphawula

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa.

*

*

  1. Uxanduva lwedatha: UMiguel Ángel Gatón
  2. Injongo yedatha: Ulawulo lwe-SPAM, ulawulo lwezimvo.
  3. Umthetho: Imvume yakho
  4. Unxibelelwano lwedatha: Idatha ayizukuhanjiswa kubantu besithathu ngaphandle koxanduva lomthetho.
  5. Ukugcinwa kweenkcukacha
  6. Amalungelo: Ngalo naliphi na ixesha unganciphisa, uphinde uphinde ucime ulwazi lwakho.