Koozali.org: home of the SME Server
Contribs.org Forums => General Discussion => Topic started by: n0lqu on April 24, 2007, 05:39:24 PM
-
We're setting up some shared ibays, following a convention our users have gotten used to over the years -- H: for personal network drives, K: for the departmental network drive, M: for the main shared drive, etc. Windows XP is showing such ibays using an overly long name of something like:
ibayname on 'SME Server (server1)' (K:)
This is putting the piece that the user knows to look for, the K: piece, way off to the right, and in come cases, such as doing a File Open in Word, it gets cut off and isn't there period. Our existing drives, on the Warp servers we are migrating off of, show up as a shorter:
sharename on 'server1' (K:)
Is there any way to get rid of the "SME Server" part, so the names show up more like the second example above? I love that we're using SME Server, but our users couldn't care less and they really don't need that information. It would be nicest if Windows just displayed the K: information first, but Bill obviously is trying to get people away from the simple drive letter concept to a more flexible, and therefore more confusing, system of accessing things by arbitrary names.
-
tried the Workgroup settings in server-manager already ?
-
Now I'm thinking... those are 2 different settings.
server string = SME Server
in /etc/smb.conf is doing this.
Use templates to place an empty "value" there. Restart your smb and you should be running as desired. (This could take a few minutes before you will see it, windows needs time to refresh the info)
template file containing the info is :
/etc/e-smith/templates/etc/smb.conf/11serverString
This needs change when you want to apply an EMPTY "values", In case people want to change it the easy way (non empty) this can be done with :
db conf setprop smb ServerString <value>
expand-template /etc/smb.conf
service smb restart
Harro
-
/etc/e-smith/templates/etc/smb.conf/11serverString
This needs change when you want to apply an EMPTY "values",
Not so.
config setprop smb ServerString ""
-
Charlie,
I tried it with - ServerString '' - ...
This makes the difference using 2 single or 2 double-quote chars ?
-
Got it... wrong syntax.. had nothing to do with quote's
My mistake.. :oops:
-
Syntax is right for all other names. Just tried it with correct syntax without any value (= "") and it does end up correct in the configuration file but the template sees it's empty and fills in the default "SME Server" again.
Template editing is needed for having no server string in smb.conf.
It does make sense to me that this has been done this way in the template but it's a pitty that editing is needed to enforce a empty string.
Maybe a suggestion for review ?
No ServerString in config then "SME Server". In case ServerString does exist in config then set the value, even if it's empty.
Harro
-
Thanks, everyone! I fixed it via a custom template as Confucius suggested. Looking at the code, using the setprop method wouldn't work because if the ServerString as set by setprop is empty, the template substitues "SME Server" anyway.
So, for the benefit of future thread readers, what I did was copy the 11serverString file from /etc/e-smith/templates/etc/smb.conf/ to /etc/e-smith/templates-custom/etc/smb.conf/
Then I edited the new copy in templates-custom and replaced the line:
"server string = $server_string";
with
"server string = ";
I then expanded the template with expand-template /etc/smb.conf
And restarted samba with /etc/init.d/smb restart
It's still showing up with the longer style on my computer/user, but when I signed on as a different user it was the shorted style, so apparently Windows is remembering it somewhere, such that even a reboot isn't making it forget -- I'll see if I can figure out where.
For other things, like Logon Drive Letter, using the setprop method explained above is probably the preferred method.
-
Looks like the name is cached in Windows' User registry here:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComputerDescriptions]
"server1"="SME Server"
On the user that kept remembering the name even after fixing it on the SME side, when I edited the string value and made it a blank string, Windows immediately (upon refresh) started showing it using the short method again. Success!
So if you do the above SME fix and you have computers that are still showing the wrong name, you should be able to copy the following to a fixname.reg file (changing the "servername" as appropriate for your network), and run it:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComputerDescriptions]
"servername"=""
You could also make it part of your netlogon sequence or a group policy.
-
Then I edited the new copy in templates-custom and replaced the line:
"server string = $server_string";
with
"server string = ";
IIUC you can achieve that without the custom template fragment via the standard db entry by quoting a space:
# config setprop smb ServerString " "
# expand-template /etc/samba/smb.conf
# grep "server string" /etc/samba/smb.conf
server string =
Darrell
-
Consolidated above comments:
To remove long name with description when reading drive letter mappings. Making it easier for the users to find the drive letters.
ie.. sharename on 'SME Server (FS)' (K:)
to
sharename on 'FS' (K:)
Create a new template fragment
cp /etc/e-smith/templates/etc/smb.conf/11serverString /etc/e-smith/templates-custom/etc/smb.conf/
use what ever editor you wish.
vi /etc/e-smith/templates-custom/etc/smb.conf/11serverString
change
{
# server string is the equivalent of the NT Description field
my $server_string = $smb{ServerString} || 'SME Server';
"server string = $server_string";
}
to
{
# server string is the equivalent of the NT Description field
my $server_string = $smb{ServerString} || '';
"server string = $server_string";
}
Save and Exit
expand-template /etc/smb.conf
/etc/init.d/smb restart
The old name description may still be cached in Windows' User registry here:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComputerDescriptions]
remove every thing here under ComputerDescriptions.
Refresh your explorer and it shold now show properly and other settings will refesh in the registry as needed.
or another option would be to display drive letter before description.
Regedit.exe
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer"
In the right-pane, create a DWORD value named "ShowDriveLettersFirst"
Double-click "ShowDriveLettersFirst" and set its data to 4
Close Regedit.exe
Possible values are:
0 = Default display - drive letters after description
1 = Network drive letters first, Local drive letters after
2 = Descriptions only, no drive letters displayed
4 = Drive letters before description
Done
If some one is inclined it coud be added to the HowTos or FAQ in the Wiki
-
Whenever possible, prevent template editing and use all options that are at hand for using the configuration database.
Darrell has given a working solution. Tried it myself too to make sure.
Harro
-
For the record, there does seem to be a minor difference between setting ServerString to a single space using setprop, and using a custom template to make server string be completely blank. With ServerString a space, Windows shows the drive as:
sharename on ' (Server1)' (K:)
with the server name in parenthesis and an extra space, versus
sharename on 'Server1' (K:)
Probably not a big deal either way for most people, just something to mention in case it is a big deal for someone.
Thanks for the tip about ShowDriveLettersFirst, Vincentmeek -- that'll help a lot too! Thanks Harro and Darrell!
-- David