Pegasus
Wed Mar 19 11:39:23 CDT 2008
"Highlander" <tron9901@msn.com> wrote in message
news:aa21404c-3a4c-41e3-8ce4-c47ee851ad92@b64g2000hsa.googlegroups.com...
On Mar 14, 11:11 am, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:
> "Highlander" <tron9...@msn.com> wrote in message
>
> news:6aed1150-660e-4aea-aa7c-8ced65c8e219@n75g2000hsh.googlegroups.com...
> On Mar 13, 4:11 pm, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:
>
>
>
>
>
> > "Highlander" <tron9...@msn.com> wrote in message
>
> >news:bb5a456a-3c96-48e7-9bce-68b5c7b695d7@v3g2000hsc.googlegroups.com...
> > On Mar 13, 3:04 pm, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:
>
> > > "Highlander" <tron9...@msn.com> wrote in message
>
> > >news:40a08981-ccb8-4ecf-8f56-91ba14bdbef3@e39g2000hsf.googlegroups.com...
>
> > > > Hello all.
>
> > > > I'm usingXcacls.vbsto enumerate the directory permissions on a
> > > > remote server.
>
> > > >
http://www.jsifaq.com/SF/Tips/Tip.aspx?id=8225
>
> > > > If you look at the example output in the above website, you'll see
> > > > the
> > > > various columns; Type, Username, Permissions and Inheritance.
>
> > > > The problem I'm seeing is that if an entry in the Username column
> > > > has
> > > > too many characters, it is being cut off. For example:
>
> > > > "ServerName12345\IUSR_ServerName12345"
>
> > > > is being displayed as
>
> > > > "ServerName12345\IUSR_Se"
>
> > > > I found a couple posts that appeared to deal with this issue, but
> > > > the
> > > > listed solution didn't work for me:
>
> > > >
http://www.itnewsgroups.net/group/microsoft.public.windows.server.gen...
> > > >
http://www.webservertalk.com/message1843654.html
>
> > > > Any suggestions on how to solve this would be greatly appreciated.
> > > > Thanks!
>
> > > > - Dave
>
> > > Before you can design a solution, you need to decide what the
> > > solution should do, e.g.
> > > - Do you want to increase the width of the "Username" column?
> > > If so, to what value?
> > > - Do you want to let the "Username" field spill into the "Permissions"
> > > field?
> > > - Some other method?- Hide quoted text -
>
> > > - Show quoted text -
>
> > Good point.
>
> > The "Username" column appears to be 23 characters wide. If that can be
> > increased to 35 characters, that would work for me.
>
> > Not sure what you mean exactly by "spill into the Permissions field."
> > Does that mean it may overwrite beginning characters in the
> > Permissions field? I would hope that it would just push the
> > Permissions field entry forward, and not overwrite anything.
>
> > Some other method? Well maybe using comma seperated values would be
> > easier? Then you might not have to worry about column width, spilling
> > into the next field, etc.
>
> > Thanks.
>
> > ================
>
> >xcacls.vbswrites each line as a text string. If you make the
> > Username field 35 characters wide then each line will be
> > 12 chars longer than it is now. If you allow the Username
> > field to spill into the Permissions field then the Permissions
> > field would be pushed right by x-23 characters in all cases
> > where x (the length of the user's name) is > 23 chars.
>
> > You can also have comma- or tab-delimited lines. As
> > you see, you need to think this through carefully before
> > modifying the script.- Hide quoted text -
>
> > - Show quoted text -
>
> Understood. If you can show me how to make the Username field 35
> characters wide, that would be great. Thanks.
> =============
> Here is a flexible way of doing it:
>
> 1. Make Line # 23 (which is currently blank) like so:
> const UserField = 35
>
> 2. Seek out the following four lines. They all contain the number "24".
> In each of them you must replace "24" with "UserField" (without
> the double quotes!).
> Call PrintMsg( strPackString("Type", 9, 1, TRUE) &
> strPackString("Username",
> 24, 1, TRUE) & strPackString("Permissions", 22, 1, TRUE) &
> strPackString("Inheritance", 22, 1, TRUE))
> Call AddStringToArray(arraystrACLS, strPackString(strAceType, 9, 1, TRUE)
> &
> strPackString(objtrustee.Domain & "\" & objtrustee.Name, 24, 1, TRUE) &
> strPackString(TempSECString, 22, 1, TRUE) & strPackString(strAceFlags, 22,
> 1, TRUE),-1)
> Call PrintMsg(strPackString("Type", 9, 1, TRUE) &
> strPackString("Username",
> 24, 1, TRUE) & strPackString("Access", 22, 1, TRUE) &
> strPackString("Inheritance", 22, 1, TRUE))
> Call AddStringToArray(arraystrACLS, strPackString(strAceType, 9, 1, TRUE)
> &
> strPackString(objtrustee.Domain & "\" & objtrustee.Name, 24, 1, TRUE) &
> strPackString(TempSECString, 22, 1, TRUE) & strPackString(strAceFlags, 22,
> 1, TRUE),-1)
>
> 3. Test the script. If you don't like the result, modify Line #23
> to suit your needs.- Hide quoted text -
>
> - Show quoted text -
Works like a champ! Thanks very much for your help Pegasus!
- Dave
==============
Thanks for the feedback.