• This is default featured slide 1 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

  • This is default featured slide 2 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

  • This is default featured slide 3 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

  • This is default featured slide 4 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

  • This is default featured slide 5 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

Top 5 dokumentaraca u 2017




Oduvijek sam uživao u gledanju zanimljivih arheoloških dokumentaraca posebice vikendom uz jutarnju kafu. Moram da istaknem da sam početkom 2017. godine koja je evo za nekoliko sati i na izmaku, postao i zvanično apsolvent katedre za Arheologiju pri Filozofskom fakultetu u Sarajevu gdje ću uskoro postati i diplomirani arheolog pa su neki arheološki dokumentarci pomogli u mom proširenju znanja, upoznavanja kultura i civilizacija starog svijeta i tako dalje. Iako se primarno zanimam i bavim arheologijom i historijom starog Bliskog Istoka, odlučio sam da s Vama podjelim top 5 dokumentaraca koje sam znao pogledati desetine puta i koji su ime mog sajta velika preporuka za pogledati. 

Autor: Amar Tufo
31. Decembar 2017



China's Ancient Pyramids 







Slika 1: Prikaz tajne grobnice prvog Kineskog cara Qin Shi Huangdi (Shanxi provincija, Kina)
Izvor slike: goo.gl/PJZVg7


S ovim sjajnim dokumentarcem National Geographic kanala počinjem svoju listu top 5 dokumentaraca. Dokumentarac je sniman na raznim lokacijama diljem Kine a prati izvanrednu priču misterioznih Kineskih piramida koje su građene još od doba vladavine dinastije Qin (246. godina prije Krista - 210. godina prije Krista) i njenog cara Qin Shi Huangdija koji je naručio izgradnju najvećeg mauzoleja u starom svijetu. Dokumentarac pominje postojanje više od 150 piramida diljem Kine za koje Kineske vlasti znaju ali su naredbom Kineske vlade naredile zasađivanje šuma preko istih piramida kako stručnjaci sa zapada ne bi dolazili i iskopavali njihove piramide. Neke od grobnica su ipak otvorene kao što je 1977. godine otkrivena grobnica vojvode Zēng Hóu Yǐ  na arheološkom nalazištu Suizhou u Hubeji provinciji iz 433. godine prije Krista. Dokumentarac možete pogledati klikom na ovaj link.


Alexander lost world - by David Adams




Slika 2: Alexandrov izgubljeni svijet (naslovna)
Izvor slike: goo.gl/SmtkmR
Kada se je prvi put pojavio 2014. godine na Viasat History kanalu, dokumentarac Aleksandrov izgubljeni svijet (eng: Alexander's lost world) prati priču velikog Makedonskog osvajaća Aleksandra Velikog na njegovom osvajanju moćne Perzije u 4 velike bitke, postajanje kraljem Azije te stvaranje moćnog i velikog carstva za samo 12 godina svog života. Domačin ovog sjajnog historijskog dokuemtarca je fotonovinar David Adams koji nas u 6-dijelnom dokumentarcu vodi na razna arheološka nalazišta diljem Grčke, Irana, Iraka, Afganistana, Pakistana, Kirgistana u potrazi za ostacima Aleksandrovih gradova kao što je Aleksandrija Oxijana (arheološko nalazište u Afganistanu poznat kao Ai Hanum, grad Mjesečeve dame). Kroz sjajnu 3D rekonstrukciju popračenu jedinstvenim naratorskim vještinama, Adams nas nakratko vraća u svijet velikog Makedonskog osvjaća Aleksandra Velikog, dokumentarac koji se i dalje prati i u 2017. godini. Šestodijelni dokumentarac možete pogledati na ovom linku.


Sponzorisan sadržaj

Imtec - Computers & Technology


Kingston SSD 120 GB

Želite ubrzati rad svog računala, laptopa, ubrzati vrijeme butanja, onda je Imtecov Kingston SSD 120 GB sjajna ponuda koju ne smijete propustiti.

Dostupan u sklopu novogodišnjeg sniženja za samo 100 KM.

Link do artikla: goo.gl/nezHvU





Underworld: Flooded kingdoms of the Ice age - by Graham Hancock 



Slika 3: Jonaguni kompleks, Japan
Izvor slike: goo.gl/NA5QQ

Ideja da su prije velike poplave oko 20 hiljada godina prije Krista postojale napredne civilizacije, za velik broj arheologa i naučnika je ništa više do fantazija i scenarij za Sci-Fy film. Za njih možda, ali ne i za kontroverznog autora po imenu Graham Hancock koji se usudio pitati pitanja koja naučnici nisu. Njegov trodijelni dokumentarac je nastao 2002. godine prema istoimenoj knjizi 'Underworld - The mysterious origins of civilization', te je ubrzo postao svjetski hit među gledaocima iako je dokumentarac ali sam Hancock naišao na niz kritika od strane akademske svjetske zajednice. Glavni cilj dokumentarca je potraga za ostacima napredne civilizacije krajem posljednjeg Ledenog doba oko 10 hiljada godina kao je: Krišnin grad Dvarka te Mohenjo Daro u Indiji, Masuda no Iwafune, Jonaguni kompleks te Sanai-Marujama arheološki kompleks u Japanu te mnogi drugi. Dokumentarac možete pogledati na ovom linku.

Australia's first four billion years - by dr. Richard Smith 



Slika 4: Australia's first four billion years (naslovna)
Izvor slike: goo.gl/9A7njx

Da li ste se ikada pitali kako je naša planeta Zemlja izgledala milijunima godina prije nego smo je naselili mi? ljudi. Jeste li se ikada zapitali kakve su životinje gmizale našim kopnom, prije dinosaurusa, plivale našim morima, letjele nebom. Takva pitanja i odgovore dao je dr. Richard Smith u sjajnom petodijelnom dokumentarcu po imenu: 'Australia's first four billion years' u slobodnom prijevodu (Australijinih četiri bilijuna godina). Dokumentarac je nastao za Australijsku TV kuću NOVA a njen domačin, dr. Richard Smith nas vodi na zanimljivo putovanje kroz nastanak planete Zemlje oko 4.7 bilijuna godina, do pojave prvih kompleksnih živih organizama u morima za doba Kambrija oko 550 milijuna godina pa sve do dolaska dinosaurusa na Australijskom tlu oko 240 milijuna godina za doba Trijasa. Ovaj sjajan dokumentarac možete pogledati na ovom linku.


Ramses the Great - an Empire Special




Slika 5: Ramzes II prikazan u hramu u Luksoru, Egipat
Izvor slike: goo.gl/w4sKJd

Ramzes II, vjerovatno i zasigurno je jedan od najpoznatijih velikih faraona nakon Tutankamona. Rođen oko 1303. godine prije Krista a na prijestol se uspeo oko 1279. godine prije Krista, ubrzo je postao jedan od najmoćnijih faraona devetnaeste dinastije koji je Egiptom vladao punih 68 godina, oženio se više od 120 puta, sagradio neke od najljepših i najpoznatijih hramova starog Egipta kao što je njegov Abu Simbel, Abidos, Deir el Medina, te Pi Rameses i mnogi drugi. Ramzes II je umro oko 1206. godine prije Krista u svojoj 92. godini života kao faraon koji je doživeo duboku starost ali i faraon sa najdužom vladavinom ostavivši zaostavštinu koju nije nadišao nijedan faraon prije niti poslije njega. Link do sjajno dokumentaraca životne priče Ramzesa II možete pogledati na ovom linku.

Šta dodati na kraju?

Ideju da kompajliram i sastavim top 5 omiljenih dokumentaraca, što se nadam da sam zaista i uspio, imao sam poodavno jer sam naveden dokumentarce pregledao nebrojen broj puta ali i uvijek sa dozom misterije i interesa. Naravo da nije isto gledati u kolosalnu statuu Ramzesa II preko dokumentarca i slike, ali je jedinstveno iskustvo na koji su autori dokumentarca približili život ovog velikog faraona svojim gledaocima a isto se odnosi i na ostala četiri pomenuta dokumentarca. Želio bih da čujem vaše mišljenje oko ove liste dokumentaraca, da li ste ikada pogledali i jedan ovdje pomenut dokumentarac na mojoj listi, šta vam se dopalo a šta ne u njima, koliko su pouzdani a koliko ne? Pišite mi u komentarima ispod, podijelite ovaj članak ako vam se dopada, te obavezno subscribe na moj YouTube kanal ovdje.
Share:

Linux Filesystem overview - part I -


Linux is a multitasking operating system which has a very different file-system unlike other Unix-like operating system. As a future Linux System administrator, one has to know what is / directory, what is inside each of directories such as /bin, /boot, /etc/, /sbin, /var and so on. In this Linux article you gonna find out the Linux file-system hierarchy and the contents of each of it's folder. Note: This article is part of my Linux LPIC-1 (Linux System administrator) intensive preparation and it is granted to be republished to other Linux related sites, to be commented and so on.

Written by: Amar Tufo
25. December 2017

Figure 1: Linux FS hierarchy 
Figure by: Amar Tufo


This is how a Linux file-system look like. Now, I'm going to explain each of the directories within the Linux file-system hierarchy starting from the (/) root directory. The article it self is going to be slightly longer but I will try to explain it to you as much as I can. Please comment down bellow for any error you see in the figure it self or in my text. 

1. /

The root file-system or root directory is a directory that contains all other directories and files on the system. It is designated by forward (/) slash. It's a top level directory in Linux file-system hierarchy. As a top level directory, it contains other sub-directories such as /bin, /sbin, /etc/, /dev/, /proc, /var and etc. The system administrator and other users who have the appropriate permissions can create additional directories within the root directory if desired. The content of the root directory can be viewed by typing the following command.


ls /



Figure 2: The / file-system
Figure source: /home/amar/Desktop/figure2.png

You may like this article as well:
Linux Booting process in 6 steps


2. /bin 

/bin directory is standard subdirectory of the root directory that contains the executable (ready to run) programs  that must be available in order to attain minimal functionality for the purposes of system booting.  Among the contents of /bin directory are the shells (bash and csh), common commands such as ls, grep, tar, kill, echo, pd, cp, mv, rm, cat and others. 


Figure 3: The content of  /bin directory 
Figure source: /home/amar/Desktop/figure3.png

3. /sbin 

It's a directory which holds the system binaries or mostly the admin tools. It's similar to /bin directory, except that /sbin programs required root password in order to be executed. Among the programs inside /sbin directory tools such as fdisk, fsck, reboot, depmod, runlevel and others. Check the figure 4 down bellow.


Figure 4: The content of /sbin directory
Figure source: /home/amar/Desktop/figure4.png

Sponsored content:
Imtec - Computers and Technology




4. /etc 

This is the nerve center of your system as it contains all system related configuration files. A 'configuration file' is defined as a local file which is used to control the operation of a program. It must be static and cannot be an binary. Among the contents of  /etc directory are the following config files.

* /etc/x11 - this file contains all the configuration for the X Window System.

* /etc/apt - It's Debian's next generation front - end for the dpkg package manager. It provides the apt-get utility and APT dselect method that provides a simpler, safer way to install and upgrade packages.

* /etc/apt/sources.list - It contains a list of apt-sources from which packages may be installed via APT.

Each of these config files can safely be viewed using cat command like cat /etc/apt/sources.list which is shown in figure 5 down bellow.


Figure 5: Content of /etc/apt/sources.list file
Figure source: /home/amar/Desktop/figure5.png

NOTE:
This article is proudly written using Linux Mint 18.2 Sonya with MATE desktop environment.
https://www.linuxmint.com/edition.php?id=239

5. /dev

The /dev directory contains the special device files for all devices. These devices are created during installation and later with the /dev/MAKEDEV script. Some of the files located within /dev directory are:

* /dev/dsp - Digital Signal Processor - interface between software which produces sound and your soundcard.

* /dev/hda - It is the master device IDE drive on the primary IDE controller.

6.  /proc




Figure 6: The content of /proc directory
Figure source: /home/amar/Desktop/figure6.png

The /proc file-system contains a illusionary file-system. It does not exist on a disk. Instead, the kernel creates it in a memory. It is used to provide information about the system processes. Some of the more important files are:

* /proc/1 - A directory with information about process number 1.

* /proc/devices - List of device drivers configured into the current running kernel.

* /proc/dma - Shows which DMA channels are being used at the moment.

* /proc/interrupts - Shows which interrupts are in use and how many of each of there have been. (See figure 7 down bellow)


 Figure 7: Listing /proc/interrupts
Figure source: /home/amar/Desktop/figure7

Book recommendation:
Linux LPIC-1 
Learn everything you need in order to pass Linux LPIC-1 exam to become Linux SysAdmin
Download URL: goo.gl/2JXDzw







7. /var 


Figure 8: The content of /var/log directory
Figure source: /home/amar/Desktop/figure8.png

The /var directory contains data that is changed when the system is running normally. It is specific for each system. Some ot the important files are listed down bellow. 

* /var/lib - Files that change while the system is running normally.

* /var/log - Log files from various programs, especially login (/var/log/wtmp) which logs all logins and logouts into the system. Syslog (var/log/messages) contains all kernel and system messages. 

8. /tmp


Figure 9: The content of /tmp directory
Figure source: /home/amar/Desktop/figure9.png

This directory contains mostly files that are required temporarily. Many of these files are important for currently running programs and deleting them may result in system failure. For more about /tmp directory please check out the link down bellow in references.

Conclusion:

Knowing the Linux file-system hierarchy may not be so important as it seems, but as a Linux System administrator you always work with the common commands such as cp, cd, mkdir, ls, grep, tar and others, therefore is good to know in which directory (/bin) you can find them. The same case goes for /proc folder which is very important to know when working with system processes and etc. In the next part of Linux FS, we gonna take a look on the rest of Linux file-system hierarchy. Till then, Marry Christmas and I see you soon.

References:

1) The Linux File-system hierarchy 

2) The root directory

3) The /bin directory

4) The /sbin directory

5) The /etc directory

6) The /dev directory

7) The /proc directory

8) The /var directory

9) The /tmp directory
Share:

LinuxGUIDE - Quick announcement


Here's a quick announcement for LinuxGUIDE

Ever since we launched our LinuxGUIDE a YouTube channel which publish Linux related stuff with Bosnian address, we have decided that from now one we gonna cover all latest Linux courses available online, top 10 things to do and share our Linux experience with our followers. We have also decided that from now one we gonna publish a Linux tutorials, how to guides, top 10 things, roadmap to Linux LPIC-1 on the website. Once on website the same content will be published in video format on Linux GUIDE channel each Friday starting from 1. January 2018.

Till than we wish you Marry Christmas and Happy New Year !!!
_________________

This article was last time edited on Thursday 28. December 2017 | 17 : 52 

Share:

Sa radom počinje kanal LinuxGUIDE


Proteklih mjesec dana imao sam nešto više obaveza nego što je to bio slučaj ranije te tako nisam imao vremena da se posvetim radu na svom YouTube kanalu. Ranije sam dobijao niz kritika po pitanju Linux tutorijala, njih desetak, koji se nalaze na mom kanalu među video klipovima iz Arheologije pa su mi pratioci predložili da kreiram poseban kanal za Linux a video klipove iz Arheologije zadržim tamo gdje jesu. Tako sam upotrebom Inkscape-a, open source alata za manipulaciju i izradu vektorske grafike uspio osmisliti i kreirati ime i logo za LinuxGUIDE, poseban kanal za Linux.

Piše: Amar Tufo
4. Decembar, 2017

1. Šta je LinuxGUIDE?


LinuxGUIDE je moj novi Linux YouTube kanal sa adresom u Tarčinu kraj Hadžića (BiH) na kojem će biti objavljivani Linux tutorijali, how to guides (kako da upute?), recenzije Linux distribucija, pregled vijesti iz svijeta popularnih Linux distribucija tipa Ubuntu, Mint, savjeti za stručne Linux obuke kao što je Linux LPIC-1, top 10 things to do after installing each new distribution i mnogo drugog zanimljivog sadržaja. Pored pomenutih tema kojima će se kanal baviti, planirani su i testovi znanja iz moje Linux LPIC-1 obuke, labovi i drugi interesantan sadržaj iz svijeta Linux-a.

2. Zvanični logo i intro kanala LinuxGUIDE


















Zvanični logo svog kanala sam lično izradio koristeći ponosno Inkscape, open source program za obradu vektorske grafike. Logo je dostupan u dvije verzije i to flat verzija lijevo te verzija loga sa zaobljenim ivicama koji se također nalazi i u oficijelnom intru. Logo se sastoji od malog naranđastog kvadratića sa zaobljenim bijelim ivicama a u sredini se nalazi Tux, maskota Linux-a. Pored je naziv mog kanala 'Linux GUIDE' sa naranđastom linijom. 


Zvanični intro kanala LinuxGUIDE

Zvanični intro kanala sam kreirao koristeći Kdenlive, sjajan open source video editor za Linux platformu. Intro se sastoji od mog loga, veoma kratke video pozadine sa bijelim 'bakljama' te kratkim audio samplom od četiri sekunde. Intro ukupno traje četiri sekunde a moj bijeli logo koristi Kdenlive fade in | fade out efekte na samom logu što omogučava kratko pojavljivanje i nestajanje pri samom kraju intra. 

3. Jezik sadržaja kanala LinuxGUIDE

Obzirom da je kanal domaći, ujedno i prvi takav u Bosni i Hercegovini, svi Linux tutorijali bit će dostupni kako na domaćem jeziku tako i na Engleskom jeziku kao jednom stranom. Iako govorim jako fino Njemački jezik, moje govorne sposobnosti ovog jezika nisu na tako dobrom nivou niti zadovoljavaju potreban nivo govornih sposobnosti da se isti Linux tutorijali i ostale Linux stvari pominju ili citiraju na Njemačkom jeziku. Stoga, imajuči na umu pomenute napomene, zvanični jezici mog kanala jesu Engleski i Bosanski jezik. 

4. Kako će se objavljivati sadržaj na kanalu LinuxGUIDE?

Obzirom da je kanal direktno povezan sa stranicom, sadržaj (tutorijali, top 10 things, savjeti i recenzije distribucija) će se objavljivati na kanalu nakon što isti bude objavljen na mom sajtu. Imajući u vidu od teme do teme svaki tutorijal i tema će proči fazu pripreme što uključuje istraživanje o temi, njenu pripremu za objavu na stranici te na kraju i njeno objavljivanje u vidu video klipa na mom kanalu. Stoga je imati na umu da će svaki novi video klip od trenutka početka rada kanala biti objavljivan svaki Petak što je sasvim dovoljno da se tema adekvatno istraži i pripremi.

___________________________________
>> Doper-Tech | Technology for you
>> Ponuda sedmice: DELL E5440 laptop <<


Šta reči na kraju?

Iako sam na petom mjesecu intenzivne obuke za Linux LPIC-1, smatram uveliko da je otvaranje posebnog te domaćeg Linux kanala pozitivna stvar u ovoj ionako suviše zatucanoj zemlji. Osnovna svrha kanala je širenje Linux-a i poticanje na upotrebu Linux distribucija i open source softwarea među mladim ljudima kao idealne korisničko-poslovne platforme koja, ukoliko se pametno iskoristi, može da vam okrene život u profesionalnu Linux karijeru što su vještine koje su stalno u porastu. Toliko od mene za sada a dole ispod možete svratiti do osposobljenog LinuxGUIDE kanala koji za sada ima samo svoj oficijelni intro bez drugog sadržaja.

1. LinuxGUIDE 
https://www.youtube.com/channel/UC0i3E9Xe5Nq1wI4IM1ZjV_g

2. Doper-Tech zvanična web stranica
    http://www.doper.ba

3. Dope-Tech Facebook stranica:
    https://www.facebook.com/dopertech/?fref=ts

Ova stranica je posljednji put ažurirana 13. Decembra 2017 | 18 : 37
Share:

Resetovanje administratorskih privilegija uređivanjem /etc/sudoers datoteke



Način na koji Linux upravlja korisnicima koji ga koriste je jako interesantan ali i zanimljiv. Naime, svi korisnici se nalaze u posebnoj datoteci po imenu /etc/passwd koja, osim što sadrži korisnike koji koriste Linux distribuciju, ona sadrži i njihov zadani shell, zatim nobody nalog koji nema ni home direktorij a ni svoj shell, i niz drugih bitnih informacija. O /etc/passwd datoteci vidi na ovom linku više. Administratorske privilegije se mogu izgubit na razne načine, ja sam ih izgubio kreiranjem novog korisnika po imenu 'ubuntugeek' te izbacanjem svog korisničkog naloga 'amar' iz grupe admin. U ovom članku ćete saznati kako resetovati vaše administratorske privilegije uređivanjem /etc/sudoers datoteke u Linux-u. Napomena: Ovaj članak je dio moje intenzivne pripreme za LPIC-1 certifikat. 

Piše: Amar Tufo
8. Oktobar, 2017

Svaki put kada instalirate vašu omiljenu Linux distribuciju bilo to Ubuntu ili Mint, od vas se traži da kreirate vaš korisnički nalog i jedinstvenu lozinku kojom pristupate vašoj distribuciji. Vaše korisničko ime se stora u jedinstvenu datoteku po imenu /etc/passwd koja sadrži niz bitni informacija o korisniku distribucije, dok se lozinka stora u datoteku /etc/shadow. Poželjno je da s vremena na vrijeme mjenjate vaše korisničko ime, grupu kojoj korisnik pripada te lozinku radi sopstvene sigurnosti.

Međutim, treba imati na umu da ovakve korake rade isključivo iskusni Linux korisnici koji znaju da koriste i upravljaju sistemskim datotekama unutar Linux-a. Pogrešno uređivanje /etc/passwd datoteke može dovesti do toga da izgubite administratorske privilegije nad vašim korisničkim nalogom nakon čega ne možete instalirate omiljene programe, ažuriranja niti izvršiti nadogradnju vaše postojeće Linux distribucije. U tome slučaju postoji rješenje a to je uređivanje i resetovanje administratorskih privilegija u /etc/suders datoteci.


Slika 1: sudoers incident 
Izvor slike: /home/amar/Desktop/slika1

Na ovoj slici vidite upravo scenario s kojim sam se susreo nakon čega mi je korisnički nalog jednostavno izgubio administratorske privilegije. Pojednostavljeno, korisnik amar više nije administrator nego obični korisnik. Kako rješiti ovaj problem? Rješenje ovog problema je izvodivo u sljedeća tri koraka: 

Resetovanje Ubuntu-a te prebacivanje u root shell prompt


Slika 2: Ubuntu root shell 
Izvor slike: /home/amar/Desktop/slika2

Vračanje ili resetovanje administratorskih privilegija za moje korisničko ime (amar) zahtjeva uređivanje /etc/sudoers datoteke u omiljenom tekst editoru kao root. Ja sam odabrao nano tekst editor. No, prije nego otvorim datoteku /etc/sudoers, potrebno je u root shell unjeti sljedeću komandu koja izgleda ovako: 

mount -o remount, rw /

Za napomenu: Vaša distribucija je trenutno u modu read only, što znači da je moguće samo pregledati datoteke vaše distribucije ali nije moguće uređivati. Navedena komanda će root file sistem prebaciti iz read only u read and write mode. Nakon ovoga možemo otvoriti datoteku /etc/sudoers za uređivanje.

Uređivanje /etc/sudoers datoteke

Ja sam do sada iznjeo neke glavne stavke ovog članka te sam scenario koji se može desiti i dogodi veom često. Ono što nisam objasnio jeste pitanje: 'Šta  je sudoers uopće?'. Kada unesete u terminal komandu man sudoers ovo je odgovor koji vam man daje.


Slika 3: Sudoers admin polica
Izvor slike: /home/amar/Desktop/slika3

Prostim jezikom, /etc/sudoers datoteka sadrži listu korisnika sa administratorski privilegijama a ona izgleda ovako.


Slika 4: Izgled /etc/sudoers datoteke
Izvor slike: /home/amar/Desktop/slika4

Jedina izmjena u ovoj datoteci je ona koja se tiće grupe %admin. Upravo u ovu grupu moramo dodati korisnika amar kako bismo mu povratili administratorske privilegije. Kod vas je naravno drugi korisnički nalog u pitanju ali su postupci isti i imati će isti efekat. 

Promjena lozinke korisnika amar i dodjela u grupu admin

Obzirom kako je moj nalog amar izgubio privremeno svoje administratorkse privilegije, potrebno je dodjeliti novu lozinku kako bismo uspješno obnovili admin privilegije nad distribucijom. Lozinku mjenjamo komandom passwd. Sintaksa joj je passwd user nakon čega dobijete poruku tipa: 'Current unix password', što izgleda ovako.


Slika 5: Promjena lozinke za nalog amar
Izvor slike: /home/amar/Desktop/slika5

Nakon što promijenite lozniku vašeg korisničkog naloga, lozinka će biti sačuvana u posebnu datoteku /etc/shadow koja čuva enkriptovanu lozniku bilo kojeg Linux korisnika. Posljednji korak je dodavanje korisnika amar u grupu admin kako bismo mu povratili admin privilegije. Takav zadatak možemo izvesti sljedećom komandom:

sudo usermod -G admin amar

Naredna slika pokazuje uspješno obavljenu radnju. U osnovi, komanda usermod se koristi i za izmjenu korisničkih podataka te na kraju dodavanje korisnika u određenu grupu.


Slika 6: Dodavanje korisnika amar u grupu admin te provjera statusa
Izvor slike: /home/amar/Desktop/slika6

Kao što vidite na slici 6, amar je uspješno dodat u grupu admin čime su mu ponovo omogućene administratorske privilegije nad Ubuntu distribucijom. 


Slika 7: amar je ponovo administrator
Izvor slike: /home/amar/Desktop/slika7

Zaključak:

Gubitak administratorskih privilegija nad vašom Linux distribucijom može biti uzrokovan nizom popratnih radnji na koje kao korisnik te na kraju kao administrator ne obraćate previše pažnje. U mom slučaju, ja sam izgubio admin privilegije kreiranjem novog korisnika te zamjena postojećih informacija unutar datoteke /etc/passwd što je kompromitovalo moje admin privilegije nad nalogom amar. Srećom, tri iznesena koraka su sve što je potrebno da se admin privilegije povrate korisniku kojemu su oduzete i to je rješenje ovog problema.

Na kraju, savjetujem da budete jako oprezni prilikom uređivanja konfiguracijskih datoteka (/etc/) jer ukoliko ne znate šta radite možete ugroziti stabilnost vašeg sistema te dovesti do neželjenog gubitka vaših podataka ili do goreg incidenta. Ja se nadam u svakom slučaju da vam je ovaj članak mnogo pomogao i da ste iz njega nešto i naučili. Pa ukoliko iskusite sličan incident, pošaljite mi tekstualni članak o vašem načinu na koji ste ga riješili. Toliko od mene za sada i do narednog čitanja. 
Share:

LinuxLab - User management - part I -


Welcome to my second LinuxLab which is a special part of my preparation for LPIC-1. This lab was created according to Linux LPIC-1 Certification Bible where I have recently cover a several chapter including user management in Linux, file permissions, and so on. So, in this article I will focus on four assignments in order to complete this article and to demonstrate how to add a new user, creating a unique user group, setting file permissions and I will show you how to use ssh/sftp protocol in order to extract a report.txt file on your private server and etc. 

Written by: Amar Tufo
4. October, 2017



On the image above you can see the tasks for LinuxLab which we have to solve in this article. I have even planed to make a YouTube tutorial for this LinuxLab but I have decided to write an article and then I shall see about YoutTube part. Let's begin!

Creating a new user!


The first part of this LinuxLab is to create a new Linux user named ubuntugeek with it's home directory and new user group named ubuntustation. There are dozens tutorials available online on how to make a new Linux user as well as new user group. But in this article you need to understand several major things when creating a new user. One in particular is the way you are gonna access the newly created user in Linux; Second is /etc/passwd file which holds all information on user including it's name, group, user id, group id, user home directory, and login shell. Now, here's my sample of /etc/passwd file.


Image 1: /etc/passwd file for user amar
Image source: /home/amar/Desktop/image1

It's very important to understand the /etc/passwd file since information stored in this file are crucial when it comes to user management in Linux as you can use this file to add user manually to your Linux distribution. For more on /etc/passwd file check this link. Here are three key notes on /etc/passwd file. 

root account - this account is known as superuser and it is the most privileged account on a Linux system. It gives you the ability to administer the system by adding new accounts, changhing user passwd, examining log files, installing software and changing file permissions. 

nobody account - this account is used for system services and has no shell or home directory.

the /bin account - contains the home directory of /bin with no shell assignment. 

You can get the same information on the current user by typing the following command like in this sample down bellow. 


grep amar /etc/passwd

Once you type your user name, the output should be as follow:


Image 2: Output of the command grep amar /etc/passwd
Image source: /home/amar/Desktop/image2

In the following table, here's an explanation of the command above to understand what these information are.


Image 3: Explanation of the grep amar /etc/passwd command
Image source: /home/amar/Desktop/image3

The last thing I wanna note here is the user password. Now, Linux store user password in a unique file named /etc/shadow. The x: character you see in the table above represents my encrypted password which is stored in /etc/shadow file. Password is basically showed in a bunch of random letters and numbers which are difficult to read but safe and encrypted. In other hands, you don't want others to know your password. Here's my sample of /etc/shadow file.


Image 4: Output of the command sudo grep amar /etc/shadow 
Image source: /home/amar/Desktop/image4

Creating ubuntugeek user.


The output for your user name will be different than my which is ok. Now, we can start to make our ubuntugeek user with it's user group and home directory. The command you will see here are well tested for the purpose of this article. There are several ways to create a new Linux user and one way that I prefer is via useradd command using the following command syntax:


sudo useradd -m ubuntugeek

Once you type the following command, you should be able to see the newly created ubuntugeek user as on this image down bellow.


Image 5: Accessing newly created user ubuntugeek using su ubuntugeek command
Image source: /home/amar/Desktop/image5

One note: In order to access our ubuntugeek user, in command above I have use -m to tell the Terminal to force create ubuntugeek home directory. Without home directory, we won't be able to access ubuntugeek user neither it's data. Before we make our user group and add ubuntugeek inside it, we need to assign ubuntugeek password. We can do that using the following command: 


sudo passwd ubuntugeek

The output of the following command is as follow:


Image 6: Assigning ubuntugeek password
Image source: /home/amar/Desktop/image6

The name of your user is different than my in the sample above, but it's the same syntax you should follow in order to assign your user password or change an existing password and etc.

Creating group ubuntustation.

User groups are essential part in Linux. Basically it can be described as a collection of multiple users which have default permissions on the system files and etc. Note, that groups need to be manage some how and that's where permissions comes in to play. Permissions are important part of Linux security since they allow Linux System administrator to set the permission for user as root account, groups and others. This way, I can set the permission to read, write and execute certain file or limit other users to write or modify the file, but grant them to read and execute certain file and so on. More on groups, please click the following link. Before I show you how to create ubuntustation group for our ubuntugeek user, I will show you how to view file permissions over the files or directory. The following command is used to see the file permissions.


cd Desktop
cd application
ls -l

In the command above, I have chosen application directory on Desktop which I have listed using the ls -l command. Here's the output.


Image 7: Listing file permissions on the application directory content
Image source: /home/amar/Desktop/image7

Each file has a default permission set assigned to user (root account), groups and others. This default permissions are known by characters such as rwx as shown on image7 above. What they does or mean is important to know because you will work with them a loot. In short, here is a explanation of rwx characters:

read (r) - it allows the file to be viewed or directory content to be listed.

write (w) - it allows you to modify the file or to write to the file.

execute (x) - it allows you to run the file, program or execute a script.

In the image 7 you can clearly see -rwx characters in front of main.cpp file in my application directory. In this case, main.cpp is C++ source code file on which I have set the default permission for user (amar) which is rwx, group can rw but can't execute the file, and others can execute and read the main.cpp file. Here's a command which I have used to set the main.cpp permissions:


chmod u+rwx,g+rw,o-wx main.cpp

The command used in this sample is chmod (change mod). It's this command that allow Linux System administrator to grant access on certain files and directories for user, groups and others or to take them away at will in order to protect the system or user it self. Since this is a LinuxLab, I don't have time to explain chmod and file permissions in detail but if you are interested to know more about this command which I highly recommend, then visit this link.

Finally, let's make our ubuntustation group and to complete this article. The command used to create group is groupadd. Here's the full command.


groupadd ubuntustation

Now, there's nothing special to note or add here to this command. Only thing is that our newest group has been created and we can now add our ubuntugeek user to ubuntustation group using the following command.


sudo usermod -G ubuntustation ubuntugeek

In the command above I have used the usermod command to add ubuntugeek user to ubuntustation. The Terminal command to make sure that we have added ubuntugeek to ubuntustation is the following:


Image 8: Checking that ubuntugeek user is part of ubuntustation group
Image source: /home/amar/Desktop/image8

This is it. We have successfully added our ubuntugeek to ubuntustation group and therefore completed this first part of my LinuxLab. Make sure to read entire article, comment it, share it via social media and please if you note errors while reading this article weather in text or Linux commands used in this article, please comment it down bellow so that I can fix it and update it as soon as possible. Until the next time, I see you soon in part two of my LinuxLab. 

Share:

My Twitter news

Popular Posts

Recent Posts

Unordered List

  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  • Aliquam tincidunt mauris eu risus.
  • Vestibulum auctor dapibus neque.

Pages

Theme Support

Need our help to upload or customize this blogger template? Contact me with details about the theme customization you need.