marți, 18 iunie 2013

Ubuntu workgroup of Windows network

ubuntuforums.org/showthread.php?t=1169149

Problem 2:
To fix this problem will require some editing of configuration files via CLI. There are easier ways to change the workgroup that Ubuntu belongs to, but many of these methods also tend to cause other problems.

The best and most reliable way to change Ubuntu's workgroup is by editing the /etc/samba/smb.conf file. This means that it may be easier to assign all of your Windows computers to the “WORKGROUP” workgroup (as outlined under "Problem 1"). Otherwise, use the following directions to edit /etc/samba/smb.conf in order to change the workgroup that Ubuntu is a member of.


Problem 2 - part 1
Open this file for editing with the following command:

Code:
gksudo gedit /etc/samba/smb.conf
Scroll down to the section that looks like this:

Code:
 #======================= Global Settings =======================

[global]

## Browsing/Identification ###

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

Change “WORKGROUP” in “workgroup = WORKGROUP” to match your Windows workgroup.


Problem 2 - part 2
It may also help to add netbios name = computer-name just below "workgroup = WORKGROUP".

Your "computer-name" can be anything, but common convention is to use the name you gave it when you installed Ubuntu (everything after the "@" symbol on the CLI prompt).

For example, here's my CLI prompt:

Code:
dmizer@shinkansen:~$
And here's my smb.conf file:

Code:
#======================= Global Settings =======================

[global]

## Browsing/Identification ###

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

Now, save the file by clicking on "File" > "save", close gedit, and restart samba with the following command (Pre Jaunty):

Code:
sudo /etc/init.d/samba restart
If, after running the above command, you see this error (Since Jaunty):

Code:
sudo: /etc/init.d/samba: command not found
Use the following command (or reboot) instead:

Code:
sudo service smbd restart