Jump to content
  • Announcements

    • spinynorman

      Mandriva Official Documentation

      Official documentation for extant versions of Mandriva can be found at doc.mandriva.com.   Documentation for the latest release may take some time to appear there. You can install all the manuals from the main repository if you have Mandriva installed - files are prefixed mandriva-doc.
    • paul

      Forum software upgrade   10/29/17

      So you may have noticed the forum software has upgraded !!!
      A few things that have changed. We no longer have community blogs (was never really used) We no longer have a portal page.
      We can discuss this, and decide whether it is needed (It costs money) See this thread: Here
Sign in to follow this  
illogic-al

NT-06: How-To set up Samba Networking

Recommended Posts

Browse: [About the FAQ Forum] [Table of Contents] [FAQs] [Contribute] [NT: Networking]

 

NT-06: How-To set up Samba Networking

 

 

Installing Samba

The first thing we need to do is get some wizard action going. As root

urpmi drakwizard

After all that's done open up Mandrake Control Center

mcc

then go to Server Wizards -> Configure Samba. Say yes to any questions which get asked till you get to something similar to this screen.

mcc-samba-wizard1.png

 

Then hit Next and enter a name for your Workgroup.

Hit Next two more times and choose an Access level

If you selected My rules you will now be given the option to refine which computers are allowed on your network.

When at the Enable Samba server step DO NOT check file sharing area. You will not be able to finish the wizard.

Continue through the wizard. If you had chosen to share printers, a configuration screen will be available to you.

 

Once this is done, you will need to configure your users. You will need to add your Windows logon id (XP only, I think, the Administrator users will be added by default for Win2k) to the users list. To do this, open a console and su to root. Then type:

 

smbpasswd -a USER

 

where USER is your Windows username. You will be prompted (twice) for a password for this user. Enter one you will remember. You will need it when you access your shares from your Windows PC, at least the first time.

 

Networking

:: Linux

To use samba between linux computers one needs to be a server (configured above) and the other needs to have smbclient installed. To do this

urpmi libsmbclient

The computer with only smbclient installed will be able to access samba shares.

The computer with smbclient AND the samba server install will be able to both serve and access shares.

 

:: Windows

To enable sharing in Windows open up the Control Panel and go to Network Connections.

Right Click on your connection and select Properties

Make sure that both Client for Microsoft Networks and File and Printer Sharing are checked.

Then right click on My Computer and go to Properties

Go to the Computer Name tab and click on the Change button.

Select a sensible name for your computer And change the workgroup to the same one that made when you configured the samba server. It doesn't have to be the same, but it's neater this way.

 

Configuring Shares

Now comes the hard part, and for this we go to the Samba Configuration file.

Open up /etc/samba/smb.conf and scroll all the way down to the bottom. Read the comments and select the type of share which you would like.

Then modify the examples to fit your specific needs.

For example, If I only want the user Illogic-al to be able to access my musiz share I'd change

# A private directory, usable only by fred. Note that fred requires write

# access to the directory.

;[fredsdir]

;  comment = Fred's Service

;  path = /usr/somewhere/private

;  valid users = fred

;  public = no

;  writable = yes

;  printable = no

to this

# A private directory, usable only by fred. Note that fred requires write

# access to the directory.

[fredsdir]

  comment = Mah Muzak

  path = /mnt/Music

  valid users =  illogic-al

  public = no

  writable = yes

  printable = no

illogic-al, of course, needs to be created using smbpassword, as stated above.

The /etc/samba/smb.conf has more examples of potential sharing situations which users may want so go check it out.

 

For those longing for a Graphical approach the samba-swat package or webmin package may be for you. Be awars however that after using samba-swat the comments in the smb.conf file will be gone. The comments provide useful information so I recommend backing up or making a copy before editing via SWAT. I'm unfamiliar with webmin and whether or not it too erases the comments.

To install SWAT

urpmi samba-swat

urpmi webmin

 

Security

There are varioius security options which are available to samba. Some are commented in the /etc/samba/smb.conf and many others are documented via man or info page.

man smb.conf

or

info smb.conf

to access them.

Two of these options will be demonstrated. Be very careful however as these options will make more insecure.

 

The first smb.conf we'll look at the security = option.

To allow access to certain shares (e.g. read-only public shares) without any logging in, change the option

security = user

in /etc/samba/smb.conf to

security = share

 

On Windows XP accounts are created by default without a password. Other account normally don't have passwords (e.g. the Guest user). If a user is added using smbpasswd samba will expect that user to have a password (even if you entered no password for the user). Therefore if you a a remote user from a Windows computer which has no password they won't be able to log in as samba will keep asking for a password.

to disable this security option put

null passwords = yes

in your /etc/samba/smb.conf file.

 

Enabling Changes

After any changes are made to the smb.conf file the samba server needs to be restarted to load them. To do this simply type as root

service smb restart

 

Accessing Shares

:: Linux

There are various which are used to access samba shares.

urpmi smb4k

is a good start.

If you use konqueror or nautilus you can access samba share bye typing

smb:/

in the address box. In konqueror it looks a little something like this

samba-kio.png

 

samba-workgroup.png

 

It is also possible to use command line tools to access samba shares. These tools are available w/ the samba-client package. To install

samba-client

This package provides smbmount which can't be used to mount shares. Usage of smbmount is left as an exercise for the reader :-)

 

 

:: Windows

 

You can browse your Samba shares by going through Network Neighborhood. Simply click on it, browse to "Computers in my Workgroup" and you should see your Samba shares. You will be prompted, at least the first time, for your username and password. Alternatively, you can mount them as network drives. Right click on My Computer and go to Map Network Drive. Choose a drive letter, then click on the Browse button. Find your shares as above and mount them to your heart's content.

 

 

/***************************************************************************

This FAQ has been brought to you by iillogic-al and LiquidZoo

Updated By illogic-al

Proofread by Steve Scrimshire

***************************************************************************/

Share this post


Link to post
Share on other sites
Sign in to follow this  

×