truncate entry computer rename

Recommended Posts

AntiVirusGuy 1

AntiVirusGuy 1

We have found that if you name your computer with to long of a name you get a lsass error

how can I take this great renaming script and truncate it if the entry is to long. Also note we put a -ws on the end of their username to indicate they are a work startion. Also does anyone no the maximum characters before you get that lsasss error? Thank you everyone in advanced

Share this post

Link to post

Share on other sites

ChrisL 11

ChrisL 11

There are also characters and spaces that are not allowed in the computer name too to consider, I did some messing about renaming a comuter this way and it all worked but just not on the network, you should find out the illegal characters too and check to make sure they havent been entered

Secret: Be advised that your computer name will affect other Microsoft BackOffice applications. For example, the hyphen (-) character is an illegal character in a machine name when working with SQL Server, but such a character isnt illegal natively inside of Windows NT Server. Computer names that contain a hyphen and run SQL Server will not be able to participate in replication or multiserver operations.

Okay, so you might want to stay away from hyphens - but alas, this site

If you attempt to name computer running Windows NT 4.0 with a restricted character, you receive an error message that indicates that your computer name will not be accessible via internet protocols and will create a substition [substitution]of a "-" character for every unacceptable character.

There is that nasty hyphen again.

As for the maximum characters before you get that lsass.exe error? Ive not encountered this and could find no reference to it online. You should be safe at 15 characters.... just which ones?

In the DNS dialog box, you may enter the computer name in the Host Name field. This is an optional entry and may be any name you like as long as illegal characters arent used. To be brutally honest, this is by default the NetBIOS name of the computer, but it can be any name consisting of letters AZ, numbers 09, the hyphen (-), and the period (.).

Share this post

Link to post

Share on other sites

AntiVirusGuy 1

AntiVirusGuy 1

I am not concerned about special charachers If you look at my script it states for users to put in their username. We had 1000 people use this script and it worked great except for about 15 who had usernames to long. Can anyone tell me how to truncate the entryEdited November 20, 2005 by ssebrownatcolby

Share this post

Link to post

Share on other sites

ChrisL 11

ChrisL 11

I am not concerned about special charachers If you look at my script it states for users to put in their username. We had 1000 people use this script and it worked great except for about 15 who had usernames to long. Can anyone tell me how to truncate the entry