Archive

Posts Tagged ‘Windows’

Samba and Windows or Linux network

October 3rd, 2011 No comments

In this tutorial we will learn to share network resources between Linux and Windows and vice versa.

WE BEGIN TO SEE THE LINUX SHARED RESOURCES FOR WINDOWS.

To begin with, and say you must have understood that a machine with any Linux distribution installed, you will usually installed Samba and smbfs client and Samba server, if there is no go to the official website of Samba – http://www.samba.org – and download it.

To show the shared resources on Windows and Linux ‘almost’ trivial.

open a shell and type:

smbclient-L ipserversamba

(the machine where the files are shared)
if you ask the password write it down.

Appear ‘a screen like this:

hsnemesi@hsndebian:~$ smbclient -L 192.168.1.199
Password: (in questo caso nn c'e' nessuna password)

Domain=[BIU] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment
--------- ---- -------
IPC$ IPC IPC remoto
D Disk
Documenti Disk
ADMIN$ Disk Amministrazione remota
C Disk

Domain=[BIU] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Server Comment
--------- -------

Workgroup Master
--------- -------

ve learning as you can see the machine name (BIU), the operating system

and then a list of items, we are interested Sharename and that ‘the share name.

in this particular case we are interested: D, C, Documents.

At this point we create a folder to see what ‘you see shares with the command mkdir.

eg:

mkdir /home/pluto/condivisioneD

now we just have to fit within our desired network resource directory with the command.
follow our example:

mount -t smbfs //192.168.1.199/D /home/pluto/condivisioneD

as if by magic and you will see in the folder /home/pluto/condivisioneD everything that is in the resource
D. Network

If there are user and passwd just add the option-o as the example below:

mount -t smbfs -o username=tuouser,password=tuapasswd //192.168.1.199/D /home/pluto/condivisioneD

NB: Always check the permissions.

That’s it. Easy is not it? Only a couple of commands.

TIME TO SEE THE RESOURCES ENSURE Linux shared in Windwos.

First you need to configure Samba by editing the smb.conf file
usually found in /etc/samba/.
Before you start making changes of which you might regret it I highly recommend making a copy.
Open this file and delete all content (we do so first): D
So you begin to write:

[Global]

name of the workgroup (the pound sign indicates a comment)
workgroup = mygroup

hosts allow = 100,100,100. 255.

machines (PCs) with access to Samba, in ‘as that goes across the network 100.100.100.1 to 100,100,100,255

interfaces = 100.100.100.1/24 100.100.100.2/24

identifies the type or network cards enabled for samba.

In ‘as it is assumed that the server has two network adapters: 100.100.100.1 100.100.100.2 and the / 24 is
indicating the netmask

wins support = no

our need not to register and resolve names windows, so we do not need this support

security=user

This setting allows us to securely authenticate users to our Samba server

log file = /var/log/samba/log.% m

With this option you write a file that will access Samba ‘updated for each machine that connects.

log level = 2

best not to increase this level if you do not want to find the log full of garbage.

TCP_NODELAY SO_RCVBUF socket options = SO_SNDBUF = 8192 = 8192

This serves to accelerate your communications with Samba

load printers = yes
printing = bsd
printcap name = /etc/printcap

allows Samba to provide network printers configured on the server.
Note that nn always printcap is located in / etc, find him.

preferred master = yes

this option will cause the Samba server for the election for browsing may be more favorably

dns proxy = no

we do not want the DNS, at least not in this context

netbios name = SambaServer

this and ‘the name by which it your own PC will be’ seen on the network, you can change it as you like.

browseable = yes

requires the appearance of the netbios name in browsers

encrypt passwords = yes

use this option if you want your client to be recognized by the authentication system for GNU / Linux

smb passwd file = /etc/samba/smbpasswd

inside this file there are passwords for users

config file = /etc/samba/smb.conf.% u

This option allows us to use a different configuration file instead of smb.conf, for example:
smb.conf.franco, use or% G for example: if smb.conf.amministratori directors is the primary group of
Membership Fees for that user. Please note: all users and groups to which they belong must be
posted on GNU / Linux system even if their passwords may be different from those of Samba.
And with this we finish the section [global]. Now for the various services.

Assume that your users are: Ciccio, Pine, Toto, Maria Franca, Tanino, Jachino, Fina and Carmela, and they
are distributed in three groups: Kitchen (users: Ciccio, Carmela and Jachino), House (users: Maria Franca
Tanino) and Garden (users: Pine, Toto and Fina). In this case we could create a service, like a
share of global exchange to which all users have access to both reading and writing, but not
we want everyone to modify / delete files of another, of course we could use the umask of Linux, but
we are down to earth and use the smb.conf like this:

[Public]
comment = Public Area interchange
user =% S
path = /home/samba/pub
browseable = yes
writeable = yes
public = yes

%d = user option allows access to this service by any user recognized by Samba.
I think the rest is intuitive, otherwise I’ll go look!

Do not forget to set the right permissions so the directory /home/samba/ pub to be viewed by users.

Then we want to make a share for each group to which only users of that group can access both read and write, like this:

[Group]
comment = Private group
user =%S
path = /home/samba/% G
browseable = yes
writeable = yes
public = no

The variable% G identify, from time to time, which of the subfolders that are named as groups: Kitchen, Home & Garden, direct the service.
Do not forget to set the right permissions so the directory /home/samba/kitchen/home/samba/home and/home/samba/Garden are seen by users.
Now we want to create a utility service as the “Official Communications”, which is accessible to all, but read-only and where only a user, properly authorized, can write. Here’s how:

[Doc_ufficiali]
comment = Official communications to all
user =% S
path = /home/samba/doc_uff
browseable = yes
ready only = yes
public = yes
admin users = Ciccio

admin users = option allows you to identify a user as amministartore of that service. Bell’opzione, but use with caution!
Do not forget to set the right permissions so the directory /home/samba/doc_uff to be viewed by users.
If I wanted to extend the rights of an entire group amministartore to do so:

admin users = @Kitchen

I could go on endlessly with pretty much give examples, but since I am bored, I stop here, just by adding a section for example printers:

[Stpampante]
user =% S
comment = Printer on the server
path = / var / spool / lpd / printer
printer name = printer
public = no
writeable = no
printable = yes
browseable = yes

Do not forget to set the right permissions so the directory /var/spool/lpd/ printer to be viewed by users.

And that’s all.

Part of the tutorial and ‘was written by me, on the other hand, and’ was taken from the internet and modified.

Remove Ubuntu from the dual boot, simply and without problems

September 23rd, 2011 No comments

If you are a player you will certainly numango.com supporter of open source, and you probably have already tried Ubuntu, since it is one of GNU / Linux applications.

The efforts of the community developers of Ubuntu have been designed to make installation and configuration of this operating system very easy, almost automatic.

In contrast, however, even if the latest versions of the distro is really simple to use, some users are still having difficulty or are too tied to habits to give up Windows. Many users, therefore I write to ask how to uninstall Ubuntu easily and safely, without any startup errors (which could happen by doing the wrong).

Remove Ubuntu

If you have installed the system from within Windows using Wubi, you can easily remove it using the same Wubi (it’s a little ‘how to remove a program).

ubuntu dual boot

If you decided instead to install the distribution in a dedicated partition (enjoying better performance as we speak of a native installation), you may run into some problems due to the removal of the system.

The most common case is this: you decide to remove Ubuntu, use a partitioning program under Windows and remove the offending partition, reboot and suddenly the computer is unusable. Terrifying, no?

But do not break down: Captain of these cases it constantly. This is because when you choose to use the dual boot during installation, are written in the first sectors of the information on the hard disk partitions (MBR) and install a bootloader (GRUB) that manages the boot. When you remove a partition without fixing this part of the hard drive to confuse the PC who does not know what to start.

If you’re a geek to hack a live distro of Linux (or use the same Windows installation DVD) and fix things even at the terminal shots, but if you’re not, or do not want to complicate his life … And ‘better read the post you read!

EasyBCD

EasyBCD is a free utility that does just run the boot program, and allows you to remove the bootloader installed with Linux and Windows to restore the default.

Open EasyBCD and click on Add New Entry. Select the tab in the Windows Operating Systems, select the version of Windows you are using and where the drive is installed (usually C:) and click Add Entry.

ubuntu dual boot

Now go to Bootloader Setup, choose the partition that you boot the PC and click on Install BCD. Continue choosing your version of Windows MBR Configuration Options and click Write MBR.

ubuntu dual boot

Now all you need to restart your computer to verify that there is no trace of GRUB (Linux bootloader) and it start with Windows directly. If everything is ok you can proceed with the physical removal of Ubuntu following the next steps.
Remove the partition

For the final step you can use a utility like EASEUS Partition Master. This is to remove the partition that contains Ubuntu and reclaim the space that will result.

When you open the program you will see all the partitions on your hard disk. That of Windows will be labeled as FAT or NTFS, while Ubuntu will be called with (Other). You do not have to do is select it and click Delete.

Ubuntu Dual Boot

Click OK to confirm and possibly remove other partitions you do not need, being careful not to remove the / and the Windows (because you recognize that fact marked as FAT or NTFS).

ubuntu dual boot

Now, all the space freed by the removal will be as Unallocated. And you can drag the edge of the Windows partition to reclaim this space for that partition.

ubuntu dual boot

When you’re ready, click the Apply button to finish your job. Then just restart at this point. During this first start will be made all the changes made and why it will take some ‘time (depending on the size and speed of the hard disk).

ubuntu dual boot remove

That’s it. Windows is once again the undisputed ruler of your PC

Generate a deb package through a project CMake

July 2nd, 2011 No comments

It is known that CMake utilization is now as manager in compiling open source projects … in fact it means you can fill out, without too many worries in mind, many projects under Unix, Windows, and so on.

Typically 2-3 just give those commands and compilation is done. But there is a tool CMake that many probably still do not know: CPack.

This always starts from the main CMakeLists.txt files and appropriate directives, allows us to generate output, for example, a deb binary package for Debian based distributions. In fact, you can also create packages with other formats (RPM, TGZ, and so on).

Generate a deb package through a project CMake

Let’s see how:

Obviously we have to assume the existence of CMake main file. To create the deb package, you must add to the bottom, something like:

 
[sourcecode language = "cpp"]
INCLUDE (InstallRequiredSystemLibraries)

SET (CPACK_SET_DESTDIR "on")
SET (CPACK_PACKAGING_INSTALL_PREFIX "/tmp")
SET (CPACK_GENERATOR "DEB")

SET (VERSION 1.1-2)
SET ($ {VERSION} CPACK_DEBIAN_PACKAGE_VERSION)
SET (CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
SET (CPACK_DEBIAN_PACKAGE_SECTION "games")
SET (CPACK_DEBIAN_ARCHITECTURE $ {CMAKE_SYSTEM_PROCESSOR})
SET (CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (> = 2.1.3), libgcc1 (> = 1: 4.1.1)")

SET (CPACK_PACKAGE_DESCRIPTION "Short description")
SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Long description")
SET (CPACK_PACKAGE_CONTACT "Developer ")
SET (CPACK_PACKAGE_FILE_NAME "$ {CMAKE_PROJECT_NAME} _ $ {VERSION} _ $ {CPACK_DEBIAN_ARCHITECTURE}")

SET (CPACK_COMPONENTS_ALL Libraries ApplicationData)
INCLUDES (CPack Documentation)
[/sourcecode]

Easy is not it?

At this point, here are the commands to do:

 
mkdir build
cd build
cmake-DCMAKE_INSTALL_PREFIX = / usr ..
CPack ..
dpkg-i pacchetto_.deb

Access to Linux partitions from Windows – Tutor for Windows 2000 as well as XP

June 24th, 2011 No comments

By retrofitting an appropriate, giveaway Windows motorist additionally accesses Linux partitions in sequence to safeguard a well-spoken sell of data.

Many Linux users additionally have a Windows upon a same mechanism (dual boot) as well as wondering how to get their interpretation from Windows upon a / a Linux partiton(s). Quite elementary really, if Windows is spiced up with a suitable drivers.

The possibilities:

ALL ACTIONS IN WINDOWS RUN!

DRIVERS FOR THE REISER FILE SYSTEM (reiserfs with SuSE)

First regard is a motorist package from http://rfsd.sf.net
Then empty a repository as well as duplicate a motorist rfsdfsd.sys drivers in a \windows\system32\ . Then click upon a motorist once to emanate a required registry entry.

A tiny some-more complicated, a expostulate mapping written with a expostulate letter. To begin a Registry Editor regedit as well as in a bend HKEY_LOCAL_MACHINE\SYSTEM\\CurrentControlSet\Session Manager\DOS Devices as well as shift a expostulate to emanate a fibre for e.g. L:

Afterwards open a latest entrance as well as sort in a assign to be (gemoutet) mounted. Note which Windows is not uniform. The numbering starts during 0 of a tough drives as well as partitions to one.
For example, we connect is a initial Linux assign upon a second tough hoop of a single entry:
\Device\Harddisk1\Partition1

Windows will right away restart, right away appears in a Explorer, a latest expostulate L:
An entrance it requires, however, a use was launched forward rfsdfsd, differently Windows will format a drive, deadly for a Linux data.

Start service:

Start-> Run authority as well as click Enter:

net begin rfsdfsd

The step should be programmed in a collection record so which a use is activated automatically during complement startup. To emanate a record with an editor declared startreiserfs.bat as well as a authority fibre to insert save rfsdfsd net start, as well as squeeze which record in to a Startup printed matter (Start | All Parogram | Startup)

EXT2 EXT3 FILE SYSTEM

The designation gestalltet is comparatively easy, since a motorist brings an installer. If we demeanour during a ext2 IFS motorist package from http://www.fs-driver.org do not worried, usually click a motorist package as well as it appears a graphical installer. If we wish to store files incomparable than 4 GB, turn upon a object in a setup capacitate a vast record feature. That was almost. After a motorist in a system, we begin a module as well as assigns a Ext2 IFS Linux assign expostulate letter.

linux expostulate in windows

Hook:
Where there is light, there is shadow.

All motorist examine a Linux record as well as office permissions from groups. As a Windows user has full entrance to Linux upon a many supportive data. Access which usually users with admin privileges upon Windows systems this record contingency be a really tiny consolation. After all a permanent work brings such absolute privileges in Windows mostly underestimated dangers with it. One might interpretation which in box of inapt handling, fire a Linux complement from Windows completely.

Glossary:

Linux record systems
The default reiserfs record complement in SuSE Distributions as well as SuSE 10.1

ext2 or ext3 in SuSE Linux is used usually for primer selection, with alternative Linux systems, it can additionally be a default record system.
From OpenSuse 10.2, it is additionally a customary complement as well as not reiserfs

WINDOWS NTFS PARTITION for reading and writing MOUNTEN USING CAPTIVE

June 20th, 2011 No comments

WINDOWS NTFS PARTITION for reading and writing MOUNTEN USING CAPTIVE

 

As the great Bill G ates may not reveal how NTFS works, and his guards as the apple of his eye internals, Linux can access it from home read only on NTFS partitions. But there is a solution with the original drivers from Microsoft Windows 2000 / XP. The project is called Captive.

Working as Captive?

Capitve integrates the original MS driver under Linux and is not difficult to install. On the website there is an RPM package for Fedora Core, which can be used but problems with Suse.
(Users of other distributions use the archive captive.tar.gz and proceed according to the instructions on the captive’s website)

After the download:
Install as root from a console, the package via rpm package manager.

Therefore, open console (the screen icon in the taskbar)

Code:
su – ENTER BUTTON
password: Enter the root password ENTER BUTTON

cd / the / download directory / where / the / directory captivepaket / / ENTER key was

rpm-Uvh *. rpm captive ENTER BUTTON

Windows on the computer is in an accessible, NTFS partition, the installer was searching captive-install itself after Acquire the Windows drivers.
Absolutely necessary Windows files ntoskrnl.exe and ntfs.sys if you can manually import to Linux, for example floppy disk. To work best drivers from the XP ServicePack 2.

Captive requires root privileges.

You can install the whole KDE from its normal user account.

After pressing the key combination ALT + F2 and entering

Code:

kdesu / usr / sbin / captive-install-Acquire

we go along with root password. Simply follow the graphical dialog. Everything went well, made the drive integration
from a Rootkonsole out with:

Code:

mount-t captive-ntfs / dev / hdx mounpoint /

where hdx is a placeholder for the Windows partition, then specify RIGHT partition (at SATA sdx) and a / mount point directory in the Linux file system that must be created beforehand. Of course the chosen mount point for the real directory name type (See previous tip). After successfully mounting You can find here the Windows data with which you can now also work via Linux.

Have Fun !!