# How to change "workgroup" in ubuntu 12.04



## AMT1989 (Aug 22, 2011)

I have a mainly windows network and have a windows home server 2011 newly added to my network 

Before this I had a different nas box which was visible from my Ubuntu machine and all my windows machines and nas were visible from Ubuntu 

On the windows pcs when I created the server I had to link them all to the "workgroup" which was actually called "workgroup" this let them all be visible to each other but now I can't see my Ubuntu machine from windows and vice Versa 

Does anyone know how to get the Ubuntu machine to join "workgroup"?


----------



## AMT1989 (Aug 22, 2011)

I have used the code 
Sudo gedit /etc/samba/smb.config

To change the workgroup and it is identical to the one in using as standard 
However I changed the word "workgroup" from all capitals to all lower case 

Restarted the laptop and not morning.. 

Then went back into it and changed "workgroup" to all capitals 

Again restarted the machine and still not discovering anything in networks 

I also tried mounting the share using the file - mount share option and failed 

However the Ubuntu machine can ping the ip of my server using terminal

Still morning visible in network... Any ideas?


----------



## wmorri (May 29, 2008)

Hi,

I just want to make sure i understand you correctly. You are trying to get your windows box to be seen by your Ubuntu box?


----------



## AMT1989 (Aug 22, 2011)

wmorri said:


> Hi, I just want to make sure i understand you correctly. You are trying to get your windows box to be seen by your Ubuntu box?


Yes, windows machines and windows home server are no linger visible over the "network" tab in Ubuntu and vice Versa Ubuntu machine is no longer visible in network tab on windows 

I can ping each machine from inside the network and all work groups on all machines show as "workgroup" but nothing is visible 

This week when I created the whs machine it was defaulted to "workgroup" so on my other windows 7 machines I had to change it from workgroup to something else and then back to workgroup to enable me to see it from the windows pcs 

Before I did this I could see all windows and Ubuntu machines on the same network


----------



## wmorri (May 29, 2008)

Is file sharing enabled on both windows box?


----------



## AMT1989 (Aug 22, 2011)

wmorri said:


> Is file sharing enabled on both windows box?


Yes, the first is a home server and the second has shared folders And set to simple file share without passwords


----------



## wmorri (May 29, 2008)

Can you post the changes to the smb.conf file? I am curious to see what you changed. I would also recommend having a look at Samba Server Guide Ubuntu


----------



## AMT1989 (Aug 22, 2011)

wmorri said:


> Can you post the changes to the smb.conf file? I am curious to see what you changed. I would also recommend having a look at Samba Server Guide Ubuntu


I will post tomorrow 

Basically I have not changed anything.. My windows workgroup is actually called "workgroup" 

Smb.conf was defaulted to workgroup - WORKGROUP 

All I did was change "workgroup" to lower case


----------



## 3DEvil (Dec 10, 2013)

Sorry if I understood you wrong.

If you just want to access the windows shares from the Ubuntu box just describe your mount in /etc/fstab and mount in using cifs for file system and with options "defaults" & "ro"

If we are talking just for network visibility use "WORKGROUP" in smb.conf because this is the default in Win and Linux IS case sensitive.

Hope I helped.

Cheers


----------



## AMT1989 (Aug 22, 2011)

3DEvil said:


> Sorry if I understood you wrong. If you just want to access the windows shares from the Ubuntu box just describe your mount in /etc/fstab and mount in using cifs for file system and with options "defaults" & "ro" If we are talking just for network visibility use "WORKGROUP" in smb.conf because this is the default in Win and Linux IS case sensitive. Hope I helped. Cheers



In the smb.conf it is set to "workgroup" already, this is my windows workgroup name 

I'm not sure how to mount the drive in /etc/fstab


----------



## 3DEvil (Dec 10, 2013)

AMT1989 said:


> In the smb.conf it is set to "workgroup" already, this is my windows workgroup name
> 
> I'm not sure how to mount the drive in /etc/fstab


Well you can do it for single use through the terminal but i suppose you don't just want to use it once so here is what you do to have it mounted at network startup:

sudo nano /etc/fstab 
go to the bottom and add/edit the following command to match your network spec:

//"ip address of server"/"shared folder path" /media(you can use mnt instead of media if you prefer)/"shared folder name" username="your windows share user",password="your windows share pass",defaults,_netdev,rw(use "ro"if you want a read only mount) 0 0

Be advised though that this leaves your username and password visible if someone would have access to your system. If you want to bypass that replase "username=*,password=*" with credentials="local path to a text file on your system". This file should be formatted as follows:
#cifs mount credentials
domain=*
username=*
password=*

Sorry if I didn't explain well. Here is a link for reference: https://chriscase.cc/2013/05/mounting-cifs-shares-at-the-linux-command-line-or-in-etcfstab/

If you're having trouble pulling it of you can contact me on a pm or skype (see if from forum profile) and I can do it for you via teamviewer or you can give me your network details and I can give you the exact command

Cheers, mate

Happy Christmas


----------



## AMT1989 (Aug 22, 2011)

3DEvil...
Happy Christmas to you two! 
Thanks for a very detailed post, il try this in the next say or so and il let you know how I get on

Have a great day


----------



## AMT1989 (Aug 22, 2011)

i didnt try your way yet but thats because i managed to get it kind of working another way round. 

i have added the drive as a "bookmark" in the home fol"network tools" then the "whois" tab in there 
used my server ip and it gave me the name of my server "server-name.cable.virginmedia.net" Virginmedia being my isp
i then had to use this address in the home folder to add the server 
used the "windows share" 
i used the name as above and my username and password 


after about an hour of trying and failing it eventually worked and i was able to add more than one of the folders inside the server 

its still very odd that no matter what i do, the server is still not visible on the networks tab but im able to access it perfectly fine when i use the bookmarked tab


----------



## 3DEvil (Dec 10, 2013)

Hi,

Why it doesn't show in the Network section is really beyond me since it should be detected. My guess would be either a firewall issue or a minor mistype in the cfg (you would not believe how many problems in Linux originate in not watching what you type )

The "bookmark" is pretty much the same thing done through the GUI (difference is that it isn't mounted at network start-up but instead gets mounted when you click it - no biggie). I gave you the long way because personally I prefer a cli solution mostly because I'm kinda used to it but also because if the GUI fails your solution won't work in a cli environment.

Anyhow you got it working and that's what counts.

Cheers, mate


----------



## AMT1989 (Aug 22, 2011)

I thought it was something to do with the firewall do I tried a few things, 
Putting the server and ubuntu machine in a DMZ... Didn't work, 
And changed the router that's controlling my network and that didn't work either 
I also tried it by disconnecting my "Internet" connection and all routers from my network 

It's very odd... As I have another nas box that's visible from the Ubuntu machines under network 


I may give that a go one day but for now it's working for me 

But again, thanks for the help


----------



## 3DEvil (Dec 10, 2013)

Hi, 

Glad I could help even a small bit.

Please if you consider the matter closed go to thread tools and mark the thread as solved so someone with a similar problem would know there is a solution.

Cheers


----------



## AMT1989 (Aug 22, 2011)

3DEvil said:


> Hi, Glad I could help even a small bit. Please if you consider the matter closed go to thread tools and mark the thread as solved so someone with a similar problem would know there is a solution. Cheers


Each bit of knowledge shared helps 

Il do it when I get home, using the mobile version at the minute so I can't


----------

