0
votes

I have a bit of an odd question. I have been asked to produce a report on the permission structure of a particular shared directory. I am currently using the AccessEnum (http://technet.microsoft.com/en-us/magazine/2009.07.geekofalltrades.aspx) tool to do this, which generates a nice list of shares and permissions.

The permissions themselves are in a simple CSV format:

Folder 1,user1,user2,user3,user5 File 1, user1, user8 Folder 2, user 2, user3, user4 File 2, user 4, user7

. There are, of course, a very larger number of files and directories with diffent selections of permissions. What I wanted to do was split the users thesmelves into seperate column headers, and have the rows for file and folder permissions as simple ticks/marks/crosses to show permission enrtry for that particular user.

For example: Folder, user1, user2, user3, user4, user5, user6, user7, user8 Folder1, x, x, x, , , x, , , File 1, x, , , , , , , x

Is there any easy way to do this, in Excel or otherwise?

Is there a better and easier way to display such permissions in an easy to read manner?

1

1 Answers

0
votes

How about

var permissionMatrix = new DataTable();
permissionMatrix.Columns.Add("Filename");

// go through files, for each user permissions identified
if (!permissionsMatrix.Columns.Contains(userEntityName))
{
    permissionsMatrix.Columns.Add(userEntityName);
}
// create new row with file name as first column
row[userEntityName] = "x";

I've written that code without checking it, and if you have huge numbers of user/groups it might not be very practical.

You can then write the DataTable to csv