LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-26-2018, 01:30 AM   #1
fyrekrig
LQ Newbie
 
Registered: Jan 2018
Posts: 8

Rep: Reputation: Disabled
Changing default workgroup name


Want to change default workgroup name and have edit

sudo nano /etc/samba/smb.conf

and changed name from WORKGROUP to HOME

but when I reboot I still got WORKGROUP

Any comment appreciated
 
Old 01-26-2018, 01:51 AM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Please open a terminal and run 'testparm'. Post the output here.
 
Old 01-26-2018, 02:18 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,841

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
Quote:
Originally Posted by fyrekrig View Post
Want to change default workgroup name
of what?
Quote:
Originally Posted by fyrekrig View Post
sudo nano /etc/samba/smb.conf

and changed name from WORKGROUP to HOME
exactly where?
Quote:
Originally Posted by fyrekrig View Post
but when I reboot I still got WORKGROUP
how did you check it (and where?)
You do not need to reboot, restarting samba should be enough (it is not windows).
 
Old 01-26-2018, 02:56 AM   #4
fyrekrig
LQ Newbie
 
Registered: Jan 2018
Posts: 8

Original Poster
Rep: Reputation: Disabled
As requested

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
dns proxy = No
log file = /var/log/samba/log.%m
map to guest = Bad User
max log size = 1000
obey pam restrictions = Yes
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
passwd program = /usr/bin/passwd %u
server role = standalone server
syslog = 0
unix password sync = Yes
usershare allow guests = Yes
workgroup = HOME
idmap config * : backend = tdb


[homes]
browseable = No
comment = Home Directories
create mask = 0700
directory mask = 0700
valid users = %S


[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes


[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
 
Old 01-26-2018, 03:29 AM   #5
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
As pan64 already asked how did you check the workgroup name? From the client? The 'workgroup =' directive is used to set a workgroup name on a samba server.

From a client, what is reported by the following?
Code:
smbclient -L <server_name>
 
Old 01-26-2018, 04:15 AM   #6
fyrekrig
LQ Newbie
 
Registered: Jan 2018
Posts: 8

Original Poster
Rep: Reputation: Disabled
As requested. Enclosed screenshot
Attached Thumbnails
Click image for larger version

Name:	samba.jpg
Views:	608
Size:	71.9 KB
ID:	26809  
 
Old 01-26-2018, 02:27 PM   #7
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
No, you're supposed to enter that command with the actual machine (NetBIOS) name that you're trying to check! Go back to post #2, and please answer the questions.
 
Old 01-26-2018, 02:49 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
By default samba uses the hostname as the netbios name unless specifically defined by a netbios name directive. You can also use the IP addresses or localhost.

smbclient -L localhost

As already asked how/where are you checking for the workgroup name?
 
Old 01-26-2018, 08:57 PM   #9
fyrekrig
LQ Newbie
 
Registered: Jan 2018
Posts: 8

Original Poster
Rep: Reputation: Disabled
I will try to answere all questions. Remember I am new to all this.

Quote:
Want to change default workgroup name. of what?
of the Linux install

Our network consists of 5 PC's running a mix of OS (Win7, Win10 and OSX)
All using workgroup name HOME

Quote:
and changed name from WORKGROUP to HOME.exactly where?
by editing /etc/samba/smb.conf

Quote:
but when I reboot I still got WORKGROUP how did you check it (and where?)
on the Network/WindowsNetwork/ desktop icon
I still have the WORKGROUP icon and the HOME icon.
I was hoping by changing the default workgroup name I would end up with only one workgroup (HOME}
I could live with the present state however when I try to get into HOME workgroup I am asked for username/passwork
and I don't remember setting any. When I try different username/passwork none works. Message "Unable to mount location.


Quote:
No, you're supposed to enter that command with the actual machine (NetBIOS) name
Quote:
smbclient -L localhost

smbclient -L 192.168.0.10
WARNING: The "syslog" option is deprecated
Enter HOME\td's password:

Sharename Type Comment
--------- ---- -------
ADMIN$ Disk Remote Admin
C$ Disk Default share
D Disk
D$ Disk Default share
E Disk
E$ Disk Default share
IPC$ IPC Remote IPC
Reconnecting with SMB1 for workgroup listing.
Connection to 192.168.0.10 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Failed to connect with SMB1 -- no workgroup available

smbclient -L localhost
WARNING: The "syslog" option is deprecated
Connection to localhost failed (Error NT_STATUS_CONNECTION_REFUSED)

Thanks all for helping me out and I hope I answered the questions correctly.
 
Old 01-26-2018, 11:53 PM   #10
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
I will try to answere all questions. Remember I am new to all this.
You should probably have disclosed this in your opening thread. Are you new to Linux specifically? It can be difficult for responders to know how best to assist and assumptions are often made that we're dealing with someone who has some understanding of what they're trying to configure, diagnose etc.

Please use code tags when posting output to preserve the formatting. Refer the '#' button in the advanced editor. Which distro and version are you using here? The reason I ask is that it's still trying to use SMB1 to connect to a share, and this has been deprecated for recent samba versions (as it's an insecure protocol). The desktop icon you refer to is likely specific to your distro's implementation of the desktop environment. (I'm not familiar with any such icon, and usually would just access a samba share on the fly via my file manager.)

Depending on how recent the kernel you're using is, I would try using the following in the [global] section (/etc/samba/smb.conf to force connectivity to SMB2_10 or above...
Code:
client max protocol = SMB3
client min protocol = SMB2_10


BTW, the workgroup name (HOME?) is only important for Windows machines viewing your Linux host. From a Linux client point of view, it's not relevant at all.

Last edited by ferrari; 01-27-2018 at 12:16 AM. Reason: Correction.
 
Old 01-27-2018, 12:14 AM   #11
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
I could live with the present state however when I try to get into HOME workgroup I am asked for username/passwork
and I don't remember setting any. When I try different username/passwork none works. Message "Unable to mount location.
Samba users passwords are managed via 'smbpasswd'. From the man page
Code:
man 8 smbpasswd
Quote:
The smbpasswd program has several different functions, depending on whether it is run by the root user or not. When run as a normal user it allows the user to change the password used for their SMB sessions on any machines that store SMB passwords.

By default (when run with no arguments) it will attempt to change the current user's SMB password on the local machine. This is similar to the way the passwd(1) program works. smbpasswd differs from how the passwd program works however in that it is not setuid root but works in a client-server mode and communicates with a locally running smbd(8). As a consequence in order for this to succeed the smbd daemon must be running on the local machine. On a UNIX machine the encrypted SMB passwords are usually stored in the smbpasswd(5) file.

When run by an ordinary user with no options, smbpasswd will prompt them for their old SMB password and then ask them for their new password twice, to ensure that the new password was typed correctly. No passwords will be echoed on the screen whilst being typed. If you have a blank SMB password (specified by the string "NO PASSWORD" in the smbpasswd file) then just press the <Enter> key when asked for your old password.
 
Old 01-27-2018, 01:48 AM   #12
fyrekrig
LQ Newbie
 
Registered: Jan 2018
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
You should probably have disclosed this in your opening thread
Should be obvius I am "Newbie" as the post is in the Newbie section and my first post.

As we are getting nowhere I am taking the easy way out and renaming the workgroup to "WORKGROUP"
on all PC's.
 
Old 01-27-2018, 03:19 AM   #13
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Use whatever works for you.
 
Old 01-27-2018, 03:49 AM   #14
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Here are three guides that help explain some of the key smb.conf settings needed to help provide anonymous samba sharing of files on a Linux machine from another workstation (in a typical home environment):

https://www.howtoforge.com/tutorial/...-ubuntu-16-04/
https://www.linux.com/news/using-sam...ux-and-windows
https://amazingrando.wordpress.com/2...password-easy/

Take the time to read them, and I'm sure you'll have better idea of how to set samba up as you'd like.
 
Old 01-27-2018, 08:26 AM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Quote:
smbclient -L localhost
WARNING: The "syslog" option is deprecated
Connection to localhost failed (Error NT_STATUS_CONNECTION_REFUSED)
samba is not running. Is samba configured to automatically start at bootup? What distribution/version is running on this PC?

Is 192.168.0.10 a Windows 7 or 10 PC. Check its settings and verify which protocol(s) are enabled and make sure that smb1 is disabled. You might need to restart the PC for the changes to take affect.

Make sure the firewall if running on the linux PC accepts samba traffic.

As far as I know homegroups are still not compatible with workgroups/samba. Make sure the Windows PCs are configured for file sharing.

https://www.howtogeek.com/howto/wind...dows-7-and-xp/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing workgroup? caa1980 Arch 2 09-05-2012 04:27 AM
Changing the location a module is loaded from without changing the default path zOSGuy Linux - Newbie 2 09-28-2010 02:43 PM
changing default to zero ramjgn Linux - Newbie 7 04-03-2009 11:20 PM
changing default mdk workgroup name under free mandriva 2006 r emeu Linux - Networking 2 03-31-2007 09:25 PM
changing default WM pmh6310 Linux - Newbie 5 06-11-2003 05:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration