Basic configuration of SAMBA, add accounts etc (LMDE)

Archived topics about LMDE 1 and LMDE 2
Locked
linXea

Basic configuration of SAMBA, add accounts etc (LMDE)

Post by linXea »

Samba – How-to (Linuxmint Debian)

First of all you need samba installed which it usually is by default. If it shouldn’t be installed please open a terminal now.

  • $ sudo apt-get install samba


Now we’re going to work with the configuration of samba. Before you start, make sure that samba isn’t running. To make sure it isn’t running you can perform following command.
  • $ sudo /etc/init.d/samba stop
The samba-config file can be found in /etc/samba/smb.conf. If you open the file already there you’ll see that it is a template. We’re going to use it as base for further configuration. It can be a good idea to make a backup of the file before you start.
  • $ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf-orginal
To start the configuration we need to start an editor. Using gnome, use gedit and if you’re using kde, use kate or kwrite. If you prefer cli-enviroment nano and VIM will work just fine. I am going to use kate here.

  • $ sudo kate /etc/samba/smb.conf


Now edit the file appropriate to your desired settings. Set workgroup and so on. When you’re finished remember to save the file of course. After that you need to start samba.
  • $ sudo /etc/init.d/samba start
Now add yourself as an user. When you’re prompted for a password, use the same as you use for your login.
  • $ sudo smbpasswd -L -a yourusername
    $ sudo smbpasswd -L -e yourusername
If you need other users to be able to access the share you need to add them to your computer and to samba as well. Make sure you use the same windows username and password.
Example
  • $ sudo useradd -s /bin/true user2
    $ sudo smbpasswd -L –a user2
    $ sudo smbpasswd -L -e user2
The "-s /bin/true" in the first line prevents the users from being able to access the commandline of your linux box ("-s" stands for "shell Don't change that setting to a valid login-shell unless you really know what you are doing)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11426
Joined: Tue Feb 03, 2009 10:27 am

Re: Basic configuration of SAMBA, add accounts etc

Post by altair4 »

I really don't like to go into another persons HowTo because I think that's rude and more importantly I wouldn't want that to happen to me :wink: Having said that I hope you don't mind some constructive criticism.

Your post would be 100% accurate only for Linux Mint Debian Edition and I would recommend stating that at the beginning. The reasons for that are as follows:

[1] There is no "samba" service in Ubuntu-based Mint only in Debian-based Mint. In regular Mint samba has been replaced with it's component daemons: smbd and nmbd

[2] In Ubuntu-based Mint smbd is not controlled by Sytem V - it's controlled by Upstart. If you did a "sudo /etc/init.d/smbd stop" it will fail with an error message telling you it's now an Upstart job. So for Ubuntu-based Mint to stop samba it would look like this:

Code: Select all

sudo service smbd stop
[3] This is more a difference of opinion rather than criticism.
Now add yourself as an user. When you’re prompted for a password, use the same as you use for your login.

$ sudo smbpasswd -L -a yourusername
$ sudo smbpasswd -L -e yourusername
I don't think a person should ever add himself to the samba password database and if he does so it should not have the same password as his login password. It's probably my obsession with security and privacy :wink: . Also there's no need to add ( -a ) and enable ( -e ) using smbpasswd since the -a operator does both by default.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
linXea

Re: Basic configuration of SAMBA, add accounts etc

Post by linXea »

Your post would be 100% accurate only for Linux Mint Debian Edition and I would recommend stating that at the beginning.
Indeed it was written to be used on debian. I wrote it years ago and since I've got a lot of questions about it lately on the IRC-channels I thought I would upload it. I appreciate your "constructive criticism". I will further add new stuff to this how-to later on like interaction between Linux & Windows using WINS. I will also attach a custom simplified smb.conf.

cheers
oobetimer

Re: Basic configuration of SAMBA, add accounts etc (LMDE)

Post by oobetimer »

I made a very simple instruction about installing a samba server .. :lol:

Click the picture and watch a video .. :D

Image
Last edited by oobetimer on Sat Jan 22, 2011 4:30 am, edited 1 time in total.
pythagorean

Re: Basic configuration of SAMBA, add accounts etc (LMDE)

Post by pythagorean »

I just copyied the conf file from my Mint 10 virtual box over to my LDME install and it works fine.
kwisher

Re: Basic configuration of SAMBA, add accounts etc (LMDE)

Post by kwisher »

Here is a link to my Samba Server How-To. It is based from my Mint-5 Gnome install so it is a little dated, but can still be adapted for Mint/Ubuntu/Debian. The only thing I do differently now is that I do not use the Samba GUI system-config-samba. In fact, this GUI is not available in LMDE.

http://www.kwdesign-consulting.com/File ... How-To.zip

linXea,

I am not trying to hijack your post here and I apologize for posting a link for my how-to. I see a lot of posts in regards to Samba/Windows file sharing. I wish there was an easier way for new users to accomplish this and would not have to always post new questions to the forum.
linXea

Re: Basic configuration of SAMBA, add accounts etc (LMDE)

Post by linXea »

I am not trying to hijack your post here and I apologize for posting a link for my how-to. I see a lot of posts in regards to Samba/Windows file sharing. I wish there was an easier way for new users to accomplish this and would not have to always post new questions to the forum.
I appreciate it, anything to make it easier for new users. The reason I posted it was to be able to use the link on #linuxmint-help (IRC). I know there are others (probably much better how-to's around) but for me to be able to more effectively help on IRC I wanted to post my own.

Cheers
Locked

Return to “LMDE Archive”