spikesource hints'n'tips

Our Top Tags

                                       

Mailing List

Keep uptodate with the latest hints'n' tips as they are published by signing up to our mailing list.

Our RSS Feeds








Latest Linux News

20 Beautiful Dark Themes for Gnome and Ubuntu

Tuesday, 19 August 2008
Cats Who Code: "Some weeks ago, I shown you a list of 30 themes for enhancing your Gnome desktop."

OpenSolaris: a Linux Admin's View

Tuesday, 19 August 2008
Linux Format: "Sun is battling hard to break into the open source operating system world with OpenSolaris. Juliet Kemp takes it for a test-drive, sampling its unique features and seeing how it fares a

What's That They Say About Assumptions?

Tuesday, 19 August 2008
Blog of Helios: "Sometimes Linux isn't the answer."

The Brampton Factor: Analysts Fail on Open Source

Tuesday, 19 August 2008
IT Pro: "For open source software to achieve its full potential, people's perceptions must change. Yet how can that happen when open source is so woefully neglected by analysts, asks Martin Brampton."

Why Red Hat Invested In JBoss Instead Of Linux Desktops

Tuesday, 19 August 2008
The VAR Guy: "Ever wonder why Red Hat spends so much time focused on the JBoss middleware market and so little time trying to make Linux a desktop standard? The answer involves some simple but startli

Latest Digg Entries

Use Samba to Map a Linux Directory to a Windows Drive

posted Tuesday, 13 September 2005
The steps to make it work:
  • Get the samba version for your platform from here

  • Install samba on your linux box. It will be installed under /opt/samba by default.

  • Edit /etc/samba/smb.conf, and add the section for the directory you want to share to windows. For example, if you want to share your /opt/spike directory to windows, then you need to add the following section into /etc/samba/smb.conf

    • [spike]
         comment = Shared Files
         path = /opt/spike/
         writeable = yes
         browseable = yes
         guest ok = no
         printable = no  

  • Add samba password by using the following command:

    • $ smbpasswd -a <username> -- this adds a user and changes their password

  • Export you directory file-system. (For the above example, you can either export /opt or /opt/spike.)

  • Go to windows box, open "My Computer" --> "Tools" --> "Map Network Dirve...", then choose a dirve name (eg. e:/f:/g:/.../z:) and map to \\server\share (eg. \\gambia\spike)

  • Use the samba user you added in step 4 to connect to \\server\share.

  • /sbin/chkconfig --add smb to setup samba as a service.

Some useful Samba commands:

  • $ testparm /etc/samba/smb.conf -- check an smb.conf for internal correctness

  • $ smbclient -L //{netbios name of server}

    • -- "netbios name" gets defined in the gloal section of the smb.conf file.

Some simple diagnostic approaches for samba problem:

  • Check if can ping the linux machine from windows

  • Check if the the linux file system be exported

  • Check if smb service running.

  • Restart the smb server using /etc/init.d/smb stop and /etc/init.d/smb start

  • Try the above useful samba commands

  • Rerun "smbpasswd -a <username>" just in case the user was deleted.

  • A universal way: compare its configuration with other machine whose samba works properly.

tags:    

links: digg this    del.icio.us    technorati    




1. vicky left...
Monday, 24 April 2006 6:51 am

How to export a file system Say "/mnt/d"?


2. Aaron left...
Thursday, 3 August 2006 2:41 am

I was wondering if you could help me. I do not know much about samba and a friend set me up samba a long time ago. Anyways, one day i ran updates on fedora and now it doesn't seem to start. I tried stopping and starting the service but smb always fails and nmb starts and stops. I get "passdb expand explicit = yes is deprecated" when i run the command to check the lines. Was wondering how I might fix this problem?


3. Kyle left...
Friday, 15 December 2006 10:15 pm

I'm a linux newbie so I didn't know how to export the file system but I found the solution here:

http://www.slackbook.org/html/network-configuration-nfs.html

Scroll down to 5.6.2. My /etc/exports file was empty so don't worry if it is for you too.


Related Posts

How to convert a string to upper or lower case in bash?

Monday, 2 October 2006 2:46 P GMT
How to convert a string to upper or lower case in bash?

How can I start a Java process and retain its process id?

Monday, 2 October 2006 2:41 P GMT
How can I start a Java process and retain its process id?

Using Fetchmail to forward email

Monday, 2 October 2006 2:29 P GMT
Fetchmail is a remote-mail retrieval and forwarding utility. This article describes how it can be set up to forward emails from a particular folder to another mailbox.

Handling different Java runtimes on a single machine

Thursday, 14 September 2006 10:48 A GMT
This entry takes a quick look at how you can best utilise different Java JVMs on the linux using a couple of techniques.

How to stop /etc/resolv.conf from being changed by DHCP?

Thursday, 7 September 2006 3:55 P GMT
Show how to keep /etc/resolv.conf unchanged when using DHCP.

How do can I tell if my network is receiving/sending multicast packets?

Tuesday, 5 September 2006 2:51 P GMT
If you are coding a multicast network application and want to make sure you are receiving muticast udp packets you can use the tcpdump linux utility. This entry shows you how.

How to clear shell command path cache?

Tuesday, 5 September 2006 1:57 P GMT
Way to clear the cached paths for various commands on bourne-like shells.

Detecting to see if a mail server is still alive using a simple shell script

Thursday, 31 August 2006 2:05 P GMT
This entry looks at using the Linux utility, nc, for determining if a given mail server is alive. You can easily adapt it for other servers.

How do I create a file of any given size on Linux?

Wednesday, 30 August 2006 2:52 P GMT
Using the dd command it is possible to create files of arbitrary lengths.

Installing RealPlayer and video codecs on Ubuntu

Wednesday, 30 August 2006 2:43 P GMT
Explain how you install RealPlayer under Ubuntu.

Does your cron script run in a bash shell, but not while running under crontab?

Tuesday, 22 August 2006 7:28 A GMT
This article explains why some scripts run correctly from a bash shell, but behave differently running from the crontab.

How do I get the canonical path for a symlink target?

Monday, 21 August 2006 1:01 P GMT
Getting canonical path for a symlink in Linux

How to find out what application is using your port

Thursday, 15 September 2005 8:00 A GMT
How to find out what application is using your port

Use Samba to Map a Linux Directory to a Windows Drive

Tuesday, 13 September 2005 4:03 P GMT
Samba is used for sharing source code and software binary between windows and linux in Windows test uploading support project.

Listing open files in linux / unix system

Thursday, 25 August 2005 6:06 P GMT
If you are working in a unix system, sometime it is not obvious if a file is being opened by some other processes or not. You can get a list of all open files by using lsof command.

How do I make sure my script isn't already running before it attempts to run again?

Thursday, 18 August 2005 7:17 P GMT
How do I make sure my script isn't already running before it attempts to run again?

CEO Kim Polese interviewed by SearchEnterpriseLinux

Wednesday, 29 June 2005 1:12 P GMT
In this SearchEnterpriseLinux.com interview, she talks about how companies are leveraging the open source model to enhance their bottom lines.