Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Desktop Environments
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Desktop Environments
Support for your Ubuntu desktop. Including Gnome, KDE and XFCE.

 
Thread Tools Display Modes
Old October 15th, 2005   #1
arnieboy
Guest
 
Beans: n/a
[SOLVED] How to share files using Samba (the more secure way)

Written by vnbuddy2002

Required tools:

- samba
- samba-common

To install:
Code:
sudo apt-get install samba

Once the server is install, issue the following command:
Code:
sudo gedit /etc/samba/smb.conf
Make the following changes:
Quote:
workgroup = WORKGROUP
underneath it, add

netbios name = name_of_your_server (no spaces)

For example:
Quote:
netbios name = kenny_smb_server
Make sure "security" is set to "user".

Scroll down until you see "[homes]", set:
Quote:
browseable = yes
writable = yes
Then save the changes.


Finally, create a SMB user, make sure this account exists on your Ubuntu Linux.
Code:
sudo smbpasswd -a `whoami`
and set your password

OKAY, you are finished configuring Samba on your Ubuntu Linux.

------------------------------------------------------------------------------------------------
Winblowz
------------------------------------------------------------------------------------------------

There are two ways to access it:

Method 1:
My network places > Entire Network > My Windows Network > Workgroup

Method 2:
in the address barm type in "\\[whatever you named the Samba server]". From my example above, I used "\\kenny_smb_server\".


You should see a folder call "homes", click on it, and it will ask you for your username and password, enter your Ubuntu Login Name and whatever you choose for the password when you used command "smbpasswd". You should be able to take it from here.

Keep in mind that you are sharing, /home/[login name]/*

------------------------------------------------------------------------------------------------
Linux
------------------------------------------------------------------------------------------------
Install smbfs:
sudo apt-get install smbfs
mkdir Network
Code:
sudo mount -t smbfs -o username=[network user],password=[network pass],uid=`whoami`,gid=`whoami`,fmask=000,dmask=000  //[whatever you named the Samba server]/[network user] /home/`whoami`/Network
Example:
Code:
sudo mount -t smbfs -o username=kenny,password=test,uid=`whoami`,gid=`whoami`,fmask=000,dmask=000  //kenny_smb_server/kenny /home/`whoami`/Network
---- END
  Reply With Quote
Old October 15th, 2005   #2
Stadsport
First Cup of Ubuntu
 
Join Date: Oct 2005
Beans: 2
Re: How to share files using Samba (the more secure way)

Thanks for the guide. I followed it, but have two questions
-When browsing the network (workgroup) from a Windows machine, my Linux machine (named Desktopsmb in Samba) doesn't appear. Typing \\Desktopsmb returns the error, "The network path was not found." Any ideas?

-Is there a way to share printers with SAMBA? Sorry if this is a different guide, but my mom uses my printer. ;D

Thanks!
Stadsport is offline   Reply With Quote
Old October 15th, 2005   #3
arnieboy
Guest
 
Beans: n/a
Re: How to share files using Samba (the more secure way)

Quote:
Originally Posted by Stadsport
Thanks for the guide. I followed it, but have two questions
-When browsing the network (workgroup) from a Windows machine, my Linux machine (named Desktopsmb in Samba) doesn't appear. Typing \\Desktopsmb returns the error, "The network path was not found." Any ideas?

-Is there a way to share printers with SAMBA? Sorry if this is a different guide, but my mom uses my printer. ;D

Thanks!
u will find the answer to this question as well as to others in the original thread which was written for hoary:
http://ubuntuforums.org/showthread.php?t=26438
use the "search this thread" tool
  Reply With Quote
Old October 16th, 2005   #4
amorangi
Just Give Me the Beans!
 
Join Date: Oct 2005
Beans: 64
Re: How to share files using Samba (the more secure way)

apt-get install smbfs comes back with "package smbfs has no installation candidate". Can someone please help?
amorangi is offline   Reply With Quote
Old October 16th, 2005   #5
majikstreet
Dipped in Ubuntu
 
majikstreet's Avatar
 
Join Date: Jul 2005
Location: olney, maryland
Beans: 532
Ubuntu 6.06 Dapper
Re: How to share files using Samba (the more secure way)

thanks so much....

why is this in gnome howtos?
__________________
majikstreet is offline   Reply With Quote
Old October 16th, 2005   #6
arnieboy
Guest
 
Beans: n/a
Re: How to share files using Samba (the more secure way)

Quote:
Originally Posted by amorangi
apt-get install smbfs comes back with "package smbfs has no installation candidate". Can someone please help?
uncomment universe and multiverse in /etc/apt/sources.list and do a
Code:
sudo apt-get update
after that
  Reply With Quote
Old October 19th, 2005   #7
arnieboy
Guest
 
Beans: n/a
Re: How to share files using Samba (the more secure way)

can a moderator kindly move this to the general HOWTO's forum? I wrote this here by mistake.
  Reply With Quote
Old October 24th, 2005   #8
Binnikemasken
5 Cups of Ubuntu
 
Join Date: Oct 2005
Beans: 15
Re: How to share files using Samba (the more secure way)

Thanks. Did every step there and it works fine. Not the way I wanted, but I'll be able to configure some things later on
Binnikemasken is offline   Reply With Quote
Old October 25th, 2005   #9
dgermann
Ubuntu Extra Shot
 
dgermann's Avatar
 
Join Date: Oct 2005
Beans: 391
Re: How to share files using Samba (the more secure way)

Hi--

Not sure what I need to do, but I have a suspicion it relates to smbfs:

Have a samba server named samba1 which has been serving up files to Win95 and WinXP machines for a couple years. I went to ubuntuguide.org and it says to enter this command to mount them on my new Ubuntu box:

Code:
sudo mount //192.168.0.1/linux /media/sharename/ -o username=myusername,password=mypassword,dmask=777,fmask=777
However, what I get is
Quote:
mount: wrong fs type, bad option, bad superblock on //192.168.0.1/linux,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
and dmesg | tail produces a bunch of setkeycode errors.

I am able to mount nfs shares, which is another way to do this, I suppose, but since I already have samba running on the server, it seems like I am opening another security hole to have nfs open, too.

BTW, there is a graphical controller for samba: it is called swat.

So what have I missed to be able to mount the samba shares from the server on my local Ubuntu box?

Do I need to install samba and smbfs on my local ubuntu box? Both or just one? Maybe they are already there. Do I need to start either one? How? Neither one shows up on ps -aux.

Thanks!

{Edit:}

I did install smbfs using Synaptic and that solved my issues here. Now I just need to figure out what the difference is between the options you used and the ones on ubuntuguide.

Thanks!
__________________
:- Doug.

Last edited by dgermann; October 25th, 2005 at 09:35 PM..
dgermann is offline   Reply With Quote
Old October 25th, 2005   #10
FLeiXiuS
Extra Foam Sugar Free Ubuntu
 
FLeiXiuS's Avatar
 
Join Date: Oct 2004
Location: Binary Land, Maryland
Beans: 635
Send a message via AIM to FLeiXiuS
Re: How to share files using Samba (the more secure way)

You may also want to add

Code:
/etc/samba/smb.conf
[global]
...
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
...
Code:
sudo cat /etc/passwd | sudo mksmbpasswd > /etc/samba/smbpasswd
sudo chmod 600 /etc/samba/smbpasswd
sudo smbpasswd username
This would provide SAMBA users with encrypted passwords over the network.
__________________
Regards,
FL-ei-|X|-iu-S
][ My Blog ][

Last edited by FLeiXiuS; March 24th, 2006 at 02:19 AM..
FLeiXiuS is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:47 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry