Announcement

Collapse
No announcement yet.

Samba set workgroup and restart?

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

    Samba set workgroup and restart?

    I needed to set the workgroup in my samba server so the other computers on my localnet can see the Kubuntu system.

    I poked around for GUI to do it, but couldn't find one, so I searched for for the samba directory (/usr/share/samba), did a backup (sudo cp smb.conf smb.conf.bku), opened smb.conf with sudo vi smb.conf, changed the workgroup, tried to save ( <esc> :wq ) but was told the file was write-protected. Checked the file permissions (644 - shouldn't sudo vi have let me edit and save the file?), did a sudo chmod 666, reopened the file in vi, changed the workgroup, saved the file and sudo chmod back to 644.

    So far, so good. Now to restart samba. Googled for some help and everybody (half a dozen sites) seemed to agree that sudo /etc/init.d/samba restart would do the trick. Not...

    Instead I get the following message:

    sudo: /etc/init.d/samba: command not found

    Back to Google, but no help. One site said to reboot the computer. GAAACK! That smacks too much of XP hell.

    Anyway, it's late and I'm hanging it up for tonight. I would appreciate any advice about what's going on.

    Regards and tia, John Kinney


    #2
    Re: Samba set workgroup and restart?

    Have a look in /etc/rc0.d/ for a samba reference (you'll have a letter followed by two numbers before the word samba)

    eg i can run
    $ sudo /etc/rc0.d/K19samba restart
    and that does the same thing as /etc/init.d/samba restart

    give it a shot!

    Comment


      #3
      Re: Samba set workgroup and restart?

      Originally posted by tim-
      Have a look in /etc/rc0.d/ for a samba reference (you'll have a letter followed by two numbers before the word samba)

      eg i can run
      $ sudo /etc/rc0.d/K19samba restart
      and that does the same thing as /etc/init.d/samba restart

      give it a shot!
      Nope...

      OK, what's going on here? There's no samba or smb reference in /etc/rc0.d or in /etc/init.d. Apparently, samba is not running.

      However, I've have no problems up until now using the Kubuntu computer to read the shared drives on the localnet XP computers. On the other hand I couldn't find the Kubuntu computer from any of the XP systems.

      This morning, I can't find the XP computers.

      Hmmm... looks like more research is in order.

      Regards, John Kinney

      Comment


        #4
        Re: Samba set workgroup and restart?

        Originally posted by jwkinneyjr
        Originally posted by tim-
        Have a look in /etc/rc0.d/ for a samba reference (you'll have a letter followed by two numbers before the word samba)

        eg i can run
        $ sudo /etc/rc0.d/K19samba restart
        and that does the same thing as /etc/init.d/samba restart

        give it a shot!
        Nope...

        OK, what's going on here? There's no samba or smb reference in /etc/rc0.d or in /etc/init.d. Apparently, samba is not running.

        However, I've have no problems up until now using the Kubuntu computer to read the shared drives on the localnet XP computers. On the other hand I couldn't find the Kubuntu computer from any of the XP systems.

        This morning, I can't find the XP computers.

        Hmmm... looks like more research is in order.

        Regards, John Kinney
        ...here's what happened:

        There are two copies of smb.conf, one in /etc/samba and one in /usr/samba. When I did the backup copy, I did the one in /etc/samba, except that I did $ sudo mv smb.conf smb.conf.bku instead of $ sudo cp smb.conf smb.conf.bku, effectively renaming the file instead of copying it.

        At that point I was interrupted and had to go run an errand. When I came back, I somehow ended up in /usr/samba and edited the copy of smb.conf that I found there. Turns out that the system looks for the copy in /etc/samba, which had disappeared because of the renaming.

        So I copied the edited file from /usr/samba to /etc/samba and tried to restart samba with $ sudo /etc/init.d/samba restart. No luck. Finally, I simply rebooted. This time I got my access back for the XP computers from Kubuntu, but Kubuntu still does not show up on my XP computers.

        I remain confused why I can't start/restart samba, and if samba isn't running ($ps -A does not list smb as a running process), what process is giving me access to the XP computers?

        Very confusing. Gotta go meet a client, so have to postpone for now.

        Regards, John Kinney


        Comment


          #5
          Re: Samba set workgroup and restart?

          Ok I have no idea why samba isn't present in your init and rc directories...

          Can you show us your smb.conf file please?

          In the meantime make a backup copy of the smb.conf file, remove samba by using $ sudo apt-get remove --purge samba, then reinstall using $ sudo apt-get install samba, and see if it then becomes present in your init and rc0.d directories...

          I had a problem with getting access to my laptop through samba which I found out was caused by having 2 network interfaces enabled (I have to disable my eth0 every time I boot up to get samba working on wlan0)...this is an issue I'm yet to try and fix but the reason I mention it is if you have 2 network interfaces then try and disable the one you're not using to see if that helps the issue.

          Comment


            #6
            Re: Samba set workgroup and restart?

            Originally posted by tim-
            Ok I have no idea why samba isn't present in your init and rc directories...

            <snip>
            OK, here's the situation, as determined after some serious Google sleuthing.

            Samba isn't present because it's not running.

            What I thought was a samba process was actually something called kio_smb, which apparently gives Konqueror the ability to read the XP shares on my localnet. Since I usually prefer to access directories and files through a GUI, and since the Konqueror display gives me an option for "Network Folders", "Samba Shares", Windows Workgroup", and remote computer name, I just naturally assumed that the information was coming from samba. Bzzzzzzzt XXX

            Unfortunately, to me this smacks of the same sort of "dumbing down" obfuscation that make M$ products so infuriating. I hate to see it showing up in KDE, which used to be something of a favorite.

            Anyway, the real issue has now become whether I can arrange for my XP computers to read files on the Kubuntu box using this kio_smb process. If not, I'll have to actually set up samba and configure it to provide that access, which is a necessary capability for me.

            So, I'll probably be getting back to samba soon, but there's no need for me to fuss with it if the kio_smb process offers the same functionality.

            Crossing fingers, John Kinney

            Comment


              #7
              Re: Samba set workgroup and restart?

              Make sure you not only install samba, but also the smbfs too.

              Comment

              Working...
              X