Multiple devices ability to rename for Nas

191 views
Skip to first unread message

john Henrick

unread,
Feb 21, 2020, 3:22:41 PM2/21/20
to Brennan Forum
Is it possible to request a setting that allows a device name change so both can seen as different devices please ?

For the BB1 and B2 devices if possible

I can map the drive as a workaround but I would like to use the Nas option

Thanks on advance

John

Daniel Taylor

unread,
Feb 21, 2020, 3:41:32 PM2/21/20
to Brennan Forum
I was under the impression that the B2 and BB1 were named BrennanB2 and BrennanBB1, respectively, for exactly that purpose.  There was early BB1 software that called that unit a B2 for NAS, but I thought that had been fixed.

Mark Fishman

unread,
Feb 21, 2020, 4:36:20 PM2/21/20
to Brennan Forum
mapping a drive letter IS "using the NAS option".

*sigh*

Anyway, what happens if you edit /etc/hostname and the /etc/hosts file? (If you don't know what I'm talking about, don't try it.)

Daniel Taylor

unread,
Feb 21, 2020, 4:39:42 PM2/21/20
to Brennan Forum
Mark,
Haven't the necessary files already been changed in current BB1 software?

john Henrick

unread,
Feb 22, 2020, 8:18:20 AM2/22/20
to Brennan Forum
Thank all

I have 2 X b2's but only one will be found in Nas as both have the same hostname

A rename option in the settings would be ideal

Peter Lowham

unread,
Feb 22, 2020, 12:25:00 PM2/22/20
to Brennan Forum
Hi John,

You can enable your B2 devices to present different NAS share names but it requires some knowledge of editing a Linux level file within the B2.

The file to be updated is 'etc/samba/smb.conf'

When you open this file, the first line normally will show

'[global]'    without the quotes)

If you insert the following line on a new line immediately after [global].  I used the name 'BrennanB2-1' in my test, but you can give your B2 any name you want provided it does not exceed 15 characters

'netbios name = BrennanB2-1'   without the quotes and spaces between the '=' character


Save this file on the B2 and power it down and up.

It might take 15 - 30 minutes for the new NAS share to show on your PC. My B2 now shows as 'BrennanB2-1' in my PC Networks section.

I have attached an example 'smb.conf' file that you can look at through Notepad or other editor.

Regards,
Peter.



smb.conf

john Henrick

unread,
Feb 22, 2020, 4:40:51 PM2/22/20
to Brennan Forum
Thanks Peter

Sounds ideal

Is there an easy guide to do this ?

Thanks in advance

John

Peter Lowham

unread,
Feb 23, 2020, 3:15:22 PM2/23/20
to Brennan Forum
Hi John,

Currently there isn't a detailed documented process for this change.  The easiest way to achieve this would be to find a friend who knows about Linux, and ask them to make the change to your 'smb.conf' file.  This edit can be done in a few minutes.

The process to get to the point of editing the file is a bit more involved.  The first step is to download a free app to your PC called 'Bitvise'.  This will give you access at character and GUI levels to your B2 at Linux level (Google 'bitvise').

When you open up Bitvise, you will need to supply the IP address of your B2, a user name (root) and a password (brennan).  When you log in using these paramters, you should see a '#' prompt. This is the Linux character level prompt.

If you want to try to get this far, let me know.  From this point, the editing of the file is fairly straight-forward.

The attached image 'Bitvise-1.jpg' shows the initial Bitvise screen.  'Bitvise-2.jpg' shows the '#' prompt that you should see if you have achieved a log in to your B2.

If you want to progress down this path, just post here again and we can progress.

Regards,
Peter.










Bitvise-1.JPG
Bivise-2.JPG

Mark Fishman

unread,
Feb 23, 2020, 3:31:52 PM2/23/20
to Brennan Forum
> This will give you access at character and GUI levels to your B2 at Linux level 
I'm not entirely sure what you mean by this. If you mean that it gives you a GUI on MS-Windows for connecting using SSH, and that ssh gives you a text-mode terminal window after logging in to the remote computer, then OK -- otherwise it's rather confusing.

Windows 10 has ssh built-in. Open a command window (in the search box next to the "start" button, type "command" and click on the top item, which should be "Command Prompt") and type:

   ssh -l root [your B2 IP address here]

without the square brackets of course. If this is the first time you've done this you will be asked to confirm the "fingerprint" of the B2 -- type yes, then you will be prompted for the root password on the B2. After you type that correctly, you wil be sitting at a linux prompt for the root account on the B2.

At this point it's relatively trivial to destroy everything on the B2, so unless you know what you are doing or are happy with the consequences of ignorance, type exit, press the enter key, and you'll be logged out.


Daniel Taylor

unread,
Feb 23, 2020, 3:39:20 PM2/23/20
to Brennan Forum
I have downloaded putty - a freeware SSH program similar to Bitvise.  And I can get to the # prompt.  Does the Raspberry Pi version of Linux include a text editor?  I know that when editing text files, you have to take care of how lines are terminated with things like CR, LF, or lack thereof.  Hopefully, a native text editor will handle that without concern.

Mark Fishman

unread,
Feb 23, 2020, 3:53:20 PM2/23/20
to Brennan Forum
My B2 has vi (short for "visual editor"), an editor all of whose essential commands fit on a coffee mug. It will use the correct newline character, and will also make sure that the last line of the file ends in a newline (which emacs, for example, doesn't do).

If you can cope with typing text in "insert" mode, and typing commands in "command" mode, you should definitely learn some simple vi commands.

Daniel Taylor

unread,
Feb 23, 2020, 4:33:22 PM2/23/20
to Brennan Forum
Good info.  I'm gonna find someplace to save that.  Thanks.

john Henrick

unread,
Feb 24, 2020, 3:33:00 PM2/24/20
to Brennan Forum
Have downloaded bitvise and can see the B2

Have downloaded SMB.conf using the sftp gui interface

No global in my file

Starts with [music]can I edit in notepad save with same extension and upload or does it have to done at the screen prompt ?

Thanks in advance

Hopefully the option to rename can be added to the menus for users with multiple devices of the same model

Peter Lowham

unread,
Feb 24, 2020, 4:54:45 PM2/24/20
to Brennan Forum
Hi John,

You're making good progress here!

First, you should take a copy of your existing 'smb.conf' on your B2 before making any changes, name the filename to something like 'smb-orig.conf', this will enable you to get back to your original configuration if anything goes wrong with your editing of the new file. Save this renamed file in 'etc/samba'.

The version of 'smb.conf' that you have uploaded to your PC can be edited and copied back up to your B2, but I would use 'notepad++' (a free download from the web).  'notepad++' should preserve the exact format of the file, whereas M/S 'notepad' and 'wordpad' have been known to make unseen changes to files which have caused problems in the Linux world.

The edit to 'smb.conf' will be to insert  the following lines at the top of the file, lines 1 and 2 (without the line numbers, as these will be supplied by notepad++)
The 'global' definition needs to be the first section in the file and needs to include the brackets.

1 [global]
2 netbios name = BrennanB2-1

You can use any name in place of 'BrennanB2-1'; I have used this as an example, but the name cannot be longer than 15 characters.

In your version of the file line 3 will then be '[music]'

You can then use bitvise sftp to copy this updated file to '/etc/samba' (the copy will ask you if you want to overwrite the existing file, so click on 'Overwrite'.

If you then reboot your B2, it will probably take something like 5 - 20 minutes for your renamed B2 to appear in your 'Networks' location on your PC(s).

As a further development, the 'smb.conf' file can be expanded to show 'playlists', videos', 'photos' folders (along with others) in the NAS directories, but that can be done in another post.  This is particularly useful for copying playlists from one Brennan to another

Regards,
Peter.



john Henrick

unread,
Mar 8, 2020, 5:14:17 PM3/8/20
to Brennan Forum
Peter

Thanks!

All my devices now renamed and viewable as different Nas names

Would like more info on the other directories available by editing when you get a chance thanks again

John

Peter Lowham

unread,
Mar 9, 2020, 3:40:01 PM3/9/20
to Brennan Forum
John,

Great to know that you are up and running with multiple Brennans on NAS.

To show additional Brennan folders to be seen through NAS, you need to further update 'etc/samba/smb.conf' on your Brennan.

I have attached here my 'smb.conf' file which has additional entries to enable other Brennan folders to show in NAS.  If you compare this file to yours, you will see the additional entries that I have added.  In my version, I have added 'videos' folder, 'playlists' folder, 'photos' folder and 'media' folder.

You can select one or more of these, depending on which folders you want to see through NAS.

The key to understanding this is that the Brennan 'smb.conf' file needs a standard format of configuration details to enable it to present a folder to NAS.  This format for adding one folder is as follows (without the # comments which I have added here for clarification).

Starting with the 'music' entry which is already in 'smb.conf':

[music]                                                    # name shown in NAS folder
comment = shared folder
path = /media/hdd1/music                      # absolute path to the Brennan folder
valid users - @users
force group = users
create mask = 0660
directory mask = 0771
read only = no

So, for each additional folder that you want to show in NAS, you can copy these eight lines in 'smb.conf' and append them at the bottom of your file, and change the '[music]' to '[playlists]' (for example) and also the line '/media/hdd1/music' to '/media/hdd1/playlists'

When you save these changes, you should see 'playlists' appear in your NAS folder for this Brennan.

If you have a look at my attached file, you should see what I have done.

If you need further clarification, just give me a shout.

Regards,
Peter.
smb-b2.conf

Daniel Taylor

unread,
Mar 9, 2020, 4:27:06 PM3/9/20
to Brennan Forum
Great information, Peter.  Thanks!

A question though:  If a software update is done, will that wipe out any changes to the smb.conf file?

Peter Lowham

unread,
Mar 9, 2020, 5:02:45 PM3/9/20
to Brennan Forum
Hi Daniel,

That's a very good question.  I made the changes to my 'smb.conf' files on my B2 and BB1 some time ago and so far the file has not been overwritten by the web upgrades.  I religiously take each upgrade as soon as it is released as I believe in a 'fix-forward' process.

To be on the safe side, I keep a copy of each 'smb.conf' file on my backup server, but I haven't had to use them yet!

Regards,
Peter.

Daniel Taylor

unread,
Mar 9, 2020, 8:19:11 PM3/9/20
to Brennan Forum
Thanks for that.  Apparently, the standard Brennan update is just the Brennan code.  In a case where the R.Pi code is upgraded, as it was for improved Bluetooth capability, then it might overwrite files such as smb.conf - but even then, not necessarily.

Peter Lowham

unread,
Mar 10, 2020, 10:48:56 AM3/10/20
to Brennan Forum
Hi Daniel,

I've looked at the upgrade/ updates situation and I agree with your conclusion.  One of the situations where the 'smb.conf' (and other home user changes) would be lost is if you have to go through the 'SD Card rebuild' process which occasionally has to be done if the SD card becomes corrupt.

Having said that, if you keep a copy of your updated files on your PC, it is a fairly quick process to reinstate your version of the file(s) if necessary.

Regards,
Peter.
Reply all
Reply to author
Forward
0 new messages