Announcement

Collapse
No announcement yet.

SAMBA

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SAMBA

    I have been trying to set up my SAMBA server with client addresses and passwords so I can configure my network to accept WindowsXP-Kubuntu desktop communications. I have been following a script off the net that tells me to set up identities in the smb world I have to do the following:

    sudo smbpasswd-a (name)
    root password
    In a terminal to allow the (name) onto the SAMBA server.

    Is this correct?

    If so, do I need to do this in a root enabled terminal or does sudo do that for me?

    #2
    Re: SAMBA

    Have you tried the easy way first? There is an option in System Settings for that. I would definitely start there

    Comment


      #3
      Re: SAMBA

      Is this correct?
      Yes "sudo" makes you root for the following command.

      So all the commands needing root privileges in the guide you found must have a sudo in front.

      Comment


        #4
        Re: SAMBA

        As above, sudo elevates you to root privileges.
        The first time you type sudo smbpasswd-a (name) you will be prompted for your password, and then for the new samba password for the user.
        Before you do anything with samba though, you need to create local accounts for every user that will have access to the system.
        Samba maps a network user to a local user, so you need the local user first.
        The easy way in system settings will cause you a whole world of grief.
        The best advice that I could give is to download samba3 by example from the samba website and manually edit the smb.conf file to suit your purposes.
        It really is quite simple.
        I have a set of user folders on my samba server with user specific permissions that works perfectly from the windows machines on my network.
        Below are the important parts of my smb.config file to help get you started;
        #======================= Global Settings =======================

        [global]

        ## Browsing/Identification ###

        # Change this to the workgroup/NT-domain name your Samba server will part of
        netbios name = EH-SRV1
        workgroup = WORKGROUP

        # server string is the equivalent of the NT Description field
        server string = %h server (EastHaven)

        ####### Authentication #######

        # You may wish to use password encryption. See the section on
        # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
        encrypt passwords = true

        # If you are using encrypted passwords, Samba will need to know what
        # password database type you are using.
        passdb backend = tdbsam

        obey pam restrictions = yes

        ; guest account = nobody
        invalid users = root

        # This boolean parameter controls whether Samba attempts to sync the Unix
        # password with the SMB password when the encrypted SMB password in the
        # passdb is changed.
        unix password sync = yes

        # For Unix password sync to work on a Debian GNU/Linux system, the following
        # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
        # sending the correct chat script for the passwd program in Debian Sarge).
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

        # This boolean controls whether PAM will be used for password changes
        # when requested by an SMB client instead of the program listed in
        # 'passwd program'. The default is 'no'.
        pam password change = yes

        # This option controls how nsuccessful authentication attempts are mapped
        # to anonymous connections
        map to guest = bad user

        ############ Misc ############

        # Using the following line enables you to customise your configuration
        # on a per machine basis. The %m gets replaced with the netbios name
        # of the machine that is connecting
        ; include = /home/samba/etc/smb.conf.%m

        # Most people will find that this option gives better performance.
        # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
        # for details
        # You may want to add the following on a Linux system:
        SO_RCVBUF=8192 SO_SNDBUF=8192
        socket options = TCP_NODELAY

        #======================= Share Definitions =======================

        [SharedDocuments]
        comment = Shared Documents
        path = /media/Network/300GB/Shared Folders/
        security = user
        public = yes
        browseable = yes
        writable = yes
        guest ok = no
        You don&#39;t need a license to drive a sandwich.

        Comment


          #5
          Re: SAMBA

          Hi Guys,

          Please forgive my lack of understanding on this particular subject, I have been trying to enter smb passwords to the SAMBA server, I have created these id's on the desktop, therefore as I understand it this should be the next step.

          mike@Kubuntu-desktop:~$ sudo smbpasswd-MikeBLaptop
          [sudo] password for mike:
          sudo: smbpasswd-MikeBLaptop: command not found
          mike@Kubuntu-desktop:~$ sudo /etc/init.d/samba stop
          * Stopping Samba daemons [ OK ]
          mike@Kubuntu-desktop:~$ sudo smbpasswd-MikeBlaptop
          sudo: smbpasswd-MikeBlaptop: command not found
          mike@Kubuntu-desktop:~$ sudo smbpasswd-a MikeBLaptop
          sudo: smbpasswd-a: command not found
          mike@Kubuntu-desktop:~$

          Can anyone tell me where I am going wrong, is it the syntax, or have I got hold of the wrong end of the stick.

          Comment


            #6
            Re: SAMBA

            sudo smbpasswd-MikeBLaptop
            this is error and as you can see the console warns you about (command not found).

            you should type:
            Code:
            # sudo smbpasswd -a MikeBLaptop
            To be sure that you won't type wrong the commandS you can type the first 2-3 letters of the command then hit the [TAB] then another letter and the [TAB] .... it is very easy.

            Now MikeBLaptop must be an existing user meaning that you can login as MikeBLaptop. I think though that this is the computer name and the above command should be:
            Code:
            # sudo smbpasswd -a mike
            Generally when you start setup a program you must always google for a guide to follow. In this case
            google:"kubuntu samba config" will give you a lot of guides, for example http://www.jonathanmoeller.com/screed/?p=594

            follow this and you will having your network ready very quickly.

            Hope I help you.

            Comment


              #7
              Re: SAMBA

              I think that's excellent help from Nzim. Also:
              • System Settings -> Advanced has a Samba Tab
              • Dolphin -> Righ Click on a directory -> Sharing has Samba stuff


              I always start the easy way
              If that fails, I dig around!

              Comment


                #8
                Re: SAMBA

                Thanks for all your help so far guys, I can report a partial success.
                I have got sight of the folders from the Kubuntu desktop on my Windows machines, and have transfered files off the smb server, but cant copy anything back to these folders from Windows, one way traffic at the moment. The printing will not work either, I have got one of the Windows machines working as a print server.
                Will keep plodding.

                Comment

                Working...
                X