Archive | Aralık, 2017

Algoritma ve Programlama

Öğretim Görevlisi Dr. Umut Engin Ayten tarafından yazılan Algoritma ve Programlama kitabı, konuyla ilgili olanlara değişik konularda fikir vermek üzere yazılmış. Verilen bilgileri saklayan, gerektiğinde bu bilgileri hızlı bir şekilde istenilen amaca uygun kullanmayı sağlayan/işleyen, mantıksal ve aritmetiksel işlemleri çok hızlı biçimde yapan bir makine olan bilgisayarın tanımından, bilgisayarların gelişimine, bilgisayar mimarilerine, bilgisayar sistemlerine, donanım ve veri depolama ünitelerine, bellek türlerine, diğer bilgisayar bileşenlerine kadar pek çok ayrıntıya değiniyor, Öğretim Görevlisi Dr. Umut Engin Ayten. Elbette ki konu, çok önemli olan bir alana, yazılıma geliyor. Aygıt yazılımı, işletim sistemi, sistem destek yazılımları ve sistem geliştirme yazılımları. Elbette ki programlama ve programlama dilleri. Ve tabii algoritma.

Continue Reading →

Öğretim Görevlisi Dr. Umut Engin Ayten’in kitabından hoşlanacağınızı umuyoruz. Algoritma ve Programlama adlı e-kitabı indirmek için tıklayınız.

0

Install, Access, Mount and Authenticate Linux Samba Server

Linux Samba server is one of the powerful servers that helps you to share files and printers with Windows-based PCs and other operating systems. Before we talk about Linux samba server, let’s discuss some basics. To understand Linux/Samba/Windows relationship, you need to understand the relationships of the operating systems, users, and networks. Linux login system is different from Windows login system. So, it’s the system administrator job to maintain the logins between different platforms.

Continue Reading →

Linux/Samba/Windows Relationship

There are several solutions to do this:

  • Linux pluggable authentication modules (PAMs): there are two user lists, one local list and one on the domain controller (DC), and users need to maintain their passwords only on the Windows system.
  • Samba as a DC: you maintain usernames and passwords on the Linux system, and users can log in to Windows boxes with Samba
  • Custom script: you can create scripts for maintaining logins and passwords, this can be done using a cross-platform scripting language like python.

The samba server composed of several components and daemons, the three main daemons are smbd, nmbd, and winbindd.

  • The smbd daemon is the main service for sharing of files and printers. This daemon uses port 139 or 445 to listen for requests.
  • The nmbd daemon handles NetBIOS name service requests. This daemon uses port 137 to listen for requests.
  • The winbindd is used to get user and group information from Windows.

Install Samba

To install Linux samba server, you need to install three packages.

For Red Hat based distros, you can install them like this:

$ dnf -y install samba

This package installs SMB server.

$ dnf -y install samba-common-tools

This package includes the required files for both the server and client.

$ dnf -y install samba-client

For Debian based distros, you can install them like this:

$ apt-get -y install samba

$ apt-get -y install samba-common-tools

$ apt-get -y install samba-client

Then you can start samba service and enable it at startup:

$ systemctl start smb

$ systemctl enable smb

Samba File Sharing

Of course, you can use web-based or GUI utilities to manage your Linux Samba server. However, it is useful to understand what GUI or web tools are doing from behind.

Now we will share a folder named myfolder:

$ chmod -R 755 myfolder

Open up Samba configuration file /etc/samba/smb.conf and add the following lines at the end:

[likegeeks]

path=/home/likegeeks/Desktop/myfolder

public=yes

writable=no

guest ok=yes

The first line is the Samba server name that the clients see.

The second line is the path to the folder that will be shared.

The third line means the share will available to all users like guest account and others. If set to no, authenticated and permitted users are only allowed.

The fourth line means that you cannot create or modify the stored files on the shared folder.

You can check for SMB configuration errors using the testparm command:

$ testparm

Now restart SMB service:

$ systemctl restart smb

Access Samba Shared Files

Now we need to access what we’ve shared. The smbclient utility is used to access Windows shared files.

You can list the shared files like this:

$ smbclient -L localhost -U%

The -U% option is used to avoid asking for the password.

As you can see our shared folder is on the list.

You can access this shared folder from Windows by just typing the IP address in the Windows explorer.

\\192.168.1.3\

You can list specific directory using the smbclient tool like this:

$ smbclient -U% //192.168.1.2/My_Folder

Once you’ve connected, you can use Linux commands to list and travel between files.

You can transfer files using get, put, mget, and mput commands.

If you are using iptables firewall, don’t forget to allow the ports 137,139 and 445.

Mounting Samba Shares

Most Linux kernels support SMB file system.

To mount a Samba share, First, create a mount point:

$ mkdir /mnt/smb

Then we mount the SMB shared folder:

$ mount -t cifs -o guest //192.168.1.2/My_Folder /mnt/smb

If the shared folder is password protected, then you type the username and password:

$ mount -t cifs username=likegeeks,password=mypassword //192.168.1.2/My_Folder

To unmount the SMB shared folder, use the unmount command like this:

$ umount /mnt/smb

On Debian based distros, you might need installing the cifsutils package in order to use it:

$ apt-get -y install cifs-utils

Creating Samba Users

To create a samba entry for an existing system user, use the pdbedit command:

$ pdbedit -a likegeeks

The new user will be created in the Samba default user database which is /var/lib/samba/private/passdb.tdb file.

With a Samba user created, we can make the shares available only to authenticated users like the user likegeeks.

This user can access his resources on Samba server using smbclient like this:

$ smbclient -U likegeeks -L //192.168.1.3

The smbpasswd command is used to change the SMB password like this:

$ smbpasswd likegeeks

Authenticate Users Using Windows Server

The winbindd daemon is used for resolving user accounts information from native Windows servers. All this from your Linux samba server.

First, install the winbind package.

$ dnf -y install samba-winbind

Then start the service like this:

$ systemctl start winbind

Then add the following options in /etc/samba/smb.conf file:

workgroup = windows-domain

password server = 192.1638.1.5

realm = windows-domain.com

kerberos method = secrets and keytab

winbind use default domain = yes

winbind enum users = yes

winbind enum groups = yes

winbind refresh tickets = yes

winbind normalize names = yes

winbind nss info = rfc2307

domain master = no

local master = no

Then Edit the /etc/nsswitch.conf file and modify the following lines:

passwd: files winbind

shadow: files winbind

group: files winbind

Then Edit the /etc/resolv.conf file and change the primary DNS server:

Search windows-domain.com

nameserver 192.168.1.5

Now join the Linux Samba server from the Windows domain using the net command:

$ net join -w WINDOWS-DOMAIN -s ' win-server' -U Administrator%password

You can list the users in Windows domain using wbinfo command

$ wbinfo -u

For any problem diagnostics, you can check the samba log files under /var/log/samba/ directory, also use testparm utility to check your configuration after you modify samba configuration file.

That’s all. I hope you find the Linux samba server easy. Keep coming back.

Thank you.

likegeeks.com

0

Mozilla Firefox 57.0.3 çıktı

Hızlı, işlevsel ve açık kaynak kodlu internet tarayıcısı Mozilla Firefox, 57.0.3 sürümüne güncellendi. Henüz resmi duyurusu yapılmamış olan sürüme ait paketler, indirilmek için yansılarda yerini buldu. Yenilikçi bir işlevsellik ve çekirdek tarayıcı performansında iyileştirmeler içeren yeni sürümde, daha hızlı bir tarayıcı vaad ediliyor. Güvenlik, kararlılık, hız ve daha fazlası” ilkesi ile yoluna devam eden tarayıcı; casus yazılımlara, virüslere ve istenmeden açılan pencerelere karşı geliştirilen koruma kalkanına, yemleme korumasına sahip ve getirdiği binlerce yararlı eklentiyle istenilen biçimde kişiselleştirilebiliyor. Çeşitli güvenlik düzeltmeleri ve kimi sorunların çözümünü içeren yeni sürümde, hızlı JavaScript performansı sağlanmış bulunuyor. Çoğu eklenti Firefox ile öntanımlı biçimde uyumlu kullanılabiliyor. HTML5, XHR, MathML, SMIL için destek standartları geliştirilen; kimi kararlılık sorunları da giderilen Mozilla Firefox, web ve eklenti geliştiricileri için donanımsal hızlandırılmış grafikler ve HTML5 teknolojileri gibi yetenekleriyle ve önemli ölçüde iyileştirilen JavaScript performansı ile geliyor. Firefox; dünyanın çeşitli yerlerindeki Mozilla topluluk üyelerinin katkılarıyla 80′den fazla dilde kullanılabiliyor.

Continue Reading →

Mozilla Firefox 57.0.2 edinmek için aşağıdaki linklerden yararlanabilirsiniz.

Resmi duyurusu yapıldıktan sonra:

0

Uruk GNU/Linux 2.0 “Xfce” çıktı

2.0 final sürümü 5 Aralık 2017’de  çıkarılan Linux-libre çekirdeğiyle gelen ve Trisquel GNU/Linux çekirdeğine dayanan Uruk GNU/Linux‘un 2.0 “Xfce” versiyonu çıktı. %100 özgür bir dağıtım olmak ereğiyle yola çıkan dağıtım, varsayılan masaüstü ortamı olarak final sürümde kullandığı Compiz ile birlikte verdiği Mate 1.12.1 yerine, Xfce masaüstü ortamıyla geliyor bu kez. Kullanıcı dostu grafik arayüzleri sunan dağıtım; hızlı, basit ve güçlü bir dağıtım ortaya koyma arzusu ile kolay özelleştirilebilir bir sistemi kullanıma sokuyor. Henüz resmi duyurusu yapılmamış olan sistem; 4.9.66 linux-libre üzerine yapılandırılmış bulunuyor ve gcc 7, Abrowser 57 gibi güncel paketler içeriyor.

Continue Reading →


Uruk GNU/Linux 2.0 “Xfce”edinmek için aşağıdaki linkten yararlanabilirsiniz.

0

Fatdog64 Linux 720 duyuruldu

Beta sürümü 1 Aralık 2017‘de duyurulan başlangıçta Puppy Linux’un bir türevi olarak oluşturulan, daha sonra Puppy Linux tarzını koruyarak bağımsız bir GNU/Linux dağıtımı haline gelen Fatdog64 Linux’un 720 final sürümü, FatDog64 Linux ekibi tarafından duyuruldu. 64 bit bilgisayarları desteklemeye odaklanan sistemin yeni sürümünü duyurmaktan mutluluk duyduklarını söyleyen geliştirme ekibi, sürümün, Fatdog64 710 ile aynı temel üzerine inşa edildiğini belirtti. Sürümdeki iyileştirmelerin çoğunun SFR’den geldiği belirtilirken, beta ve önceki sürümlerde geri bildirim, öneri, tavsiye, hata raporları, hata düzeltmeleri şeklinde her türlü katkıyı yapanlara teşekkür edildiği ifade edildi. Fatdog64 Linux 720 hakkında ayrıntılı bilgi edinmek için sürüm duyurusunu ve sürüm notlarını inceleyebilirsiniz.

Continue Reading →

Fatdog64 Linux 720 edinmek için aşağıdaki linklerden yararlanabilirsiniz.

0

Develop iOS Apps Using Swift

In the previous post, we talked about iOS language basics and we saw how easy it is to work with Swift language. In this post, we will learn how to work with Xcode and how to develop iOS apps using Swift. Today we will start with a hello world app, so let’s get started. Open Xcode and create a new Xcode project then click single view application.

Continue Reading →

Exploring Xcode

Open Xcode and create a new Xcode project then click single view application

Now type your application name and click next then save your application

Now Xcode will open, you will see a list of files on the left as follows:

  • AppDelegate.swift
  • ViewController.swift
  • Main.storyboard
  • Assets.xcassets
  • LaunchScreen.storyboard
  • Info.plist

The column that contains these files is called navigator.

The center pane of Xcode is called editor where you edit and start coding.

Any file on the left, when you click it, it will open in the center editor area.

Click on the Main.storyboard file, a rectangle in the middle with the title view controller appeared.

On the right hand, there is a column which is attribute inspector.

At the right bottom, there is the object library panel where you drag your components that will be shown to the user as we will see later.

As you can see, on the left, there is a hierarchical list of all components for your selected file which is the view controller in our case, this panel is the document outline panel.

Add Objects to the View Controller

From the objects library panel, search for UIImageView control.

Now drag the UIImageView from the bottom border so it fits the entire corners of the view controller.

I’m going to use two images to show you how to use UIImageView. Click on the Assets.xcassets in the navigator on the left, then drag the images to the document outline.

Click again on the Main.storyboard and select the UIImageView and click the attribute inspector.

Select from the dropdown the image that you need to set as a background for the UIImageView

Then set the content mode for the UIImageView to be Aspect Fill.

Now you can see the image appears perfectly on the UIImageView.

We need to add another UIImageView to put our logo in the center of the screen. Drag another UIImageView from the object library and set the image from the attribute inspector the same way.

UIButton Control

Drag a UIButton from the object library and place it at the top of the view controller.

Change the button attributes from the attribute inspector, you can change the text of the button and the color.

Now let’s run the app to see it in action. Click on the run button on the top of Xcode and wait until the build process completes.

The iPhone simulator will open up and your program should run inside that simulator without problems.

Besides the run button, there is a list of simulators that are shipped with Xcode, you can choose any one of them to run your program.

In my case, I’ve selected iPhone 7 simulator.

Very good!! Your app runs successfully and if you click on the button nothing happens because we didn’t write any code yet for that button.

To close your program, click on the square button

Handling Events

To wire UI elements like a button or image to a code file, you should use @IBOutlet, and to perform actions when a certain UI element is interacted with, you should use @IBAction function.

Click on the assistant editor on the right corner which has interlocking circles icon.

Now we need create @IBOutlets for each image and one @IBAction for the UIButton.

To create an @IBOutlet for the image, right click on the image and drag the mouse to ViewController.swift and exactly above the viewDidLoad() function.

A popup will appear to ask you about the outlet name you want to create. Type the name you want and click connect.

Repeat the same steps for the logo image view.

For the button, right click and drag the button to ViewController.swift and release the mouse blew didReceiveMemoryWarning() function.

When the mouse is released, a popup will appear to ask you about the event type and the name of the action.

Choose the connection type as an action and type the action name and click connect.

As you see, the created action looks like a function. Actually, it’s a function that can be triggered when the button is pressed.

Basic Coding

Let’s do a very basic coding. When the user clicks the button the images disappear.

Go to the button @IBAction and type the following:

backgroundIV.isHidden = true

logoIV.isHidden = true

Run the app and wait for the build process to finish and when the program shows up click on the button and see what will happen.

Wow!! The images disappeared. That’s your first iOS action. Congratulations!

It’s not that good but its working.

I hope you find the post interesting. Keep coming back.

Thank you.

likegeeks.com

0

MPV Player 0.28 duyuruldu

MPlayer ve mplayer2 tabanlı bir medya oynatıcı olan MPV Player’in 0.28 sürümü duyuruldu. GNU Genel Kamu Lisansı ile lisanslı özgür bir yazılım olan MPV Player; GNU/Linux, MacOS ve Unix olmayan Windows da dahil olmak üzere çeşitli işletim sistemlerinde çalışır. MPV Player tutkunları için yeni bir sürüme güncelleme yapma ihtiyacı doğduğu bildirilirken, yeni sürümün çoğunlukla OpenGL video çıkışı güncellemelerinden oluştuğu ifade ediliyor. MPV Player 0.28 hakkında ayrıntılı bilgi edinmek için GitHub üzerindeki sürüm duyurusunu inceleyebilirsiniz.

Continue Reading →

MPV Player 0.28 edinmek için aşağıdaki linklerden yararlanabilirsiniz.

0