Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Localization (HideBuildInAccounts not working) #67

Closed
Manschk3rl opened this issue Nov 30, 2022 · 4 comments
Closed

Add Localization (HideBuildInAccounts not working) #67

Manschk3rl opened this issue Nov 30, 2022 · 4 comments
Assignees
Labels
bug There is a issue or error with Super Grate. enhancement New feature or request. todo Something to work on in the future.
Milestone

Comments

@Manschk3rl
Copy link
Contributor

Describe the bug
If you have set your operating system to german, the setting "HideBuildInAccounts" does not work.
it shows entries like "NT-AUTHORITÄT\SYSTEM" (which is german for "NT-AUTHORITY\SYSTEM")

To Reproduce
Steps to reproduce the behavior:

  1. Set your OS language to german.
  2. Start SuperGrate.
  3. Under "Settings" set "HideBuildInAccounts" on "true".
  4. "Source Computer" > local machine
  5. "List Source"
  6. See the error

Expected behavior
"NT-xxx" entries should not appear in the list.

Screenshots
1
2

Logs
[SUCCESS]<11:49:53> Config loaded! [SUCCESS]<11:49:53> Welcome to Super Grate! v1.3.5.0 [INFO]<11:49:53> Enter some information to get started! [INFO]<11:49:59> Getting list of users on: ZE999-WIN11... [VERBOSE]<11:49:59> Found: ZE999-Win11\test [WARNING]<11:49:59> Could not resolve as an SID via WMI! [VERBOSE]<11:49:59> Found: S-1-5-21-85594344-4232975197-2231365188-1002 [VERBOSE]<11:49:59> Found: ZE999-Win11\Admin [VERBOSE]<11:49:59> Found: NT-AUTORITÄT\Netzwerkdienst [VERBOSE]<11:49:59> Found: NT-AUTORITÄT\Lokaler Dienst [VERBOSE]<11:49:59> Found: NT-AUTORITÄT\SYSTEM [SUCCESS]<11:49:59> Users listed successfully. [INFO]<11:55:00> Writing log to: C:\Users\Admin\Desktop\SuperGrate_30.11.2022_11-54-57.log...

Additional context
Im not a programmer but i guess its because the program is searching for "NT AUTHORITY". Found in "SuperGrate/Classes/Misc.cs" line 107 if (bool.TryParse(Config.Settings["HideBuiltInAccounts"], out bool setting) && setting && (**user.Contains("NT AUTHORITY")** || **user.Contains("NT SERVICE")**))

@Manschk3rl Manschk3rl added the bug There is a issue or error with Super Grate. label Nov 30, 2022
@Manschk3rl Manschk3rl changed the title HideBuildInAccounts HideBuildInAccounts not working Nov 30, 2022
@krisdb2009 krisdb2009 self-assigned this Nov 30, 2022
@krisdb2009
Copy link
Member

Thanks for the report, it sounds like I am going to need to localize Super Grate with different languages.
That is a big task so might take me a few weeks to build in localization. I will likely need help from you with translating to German as well if you are up for it.

@krisdb2009 krisdb2009 added this to the 1.4.0.0 milestone Nov 30, 2022
@krisdb2009 krisdb2009 added enhancement New feature or request. todo Something to work on in the future. labels Nov 30, 2022
@krisdb2009 krisdb2009 changed the title HideBuildInAccounts not working Add Localization (HideBuildInAccounts not working) Nov 30, 2022
@Manschk3rl
Copy link
Contributor Author

Manschk3rl commented Dec 1, 2022

Hi, i found a better solution. The SID from the NT-Accounts are always S-1-5-18 - 20. I replaced your user.Contains("NT AUTHORITY") || user.Contains("NT SERVICE") with an easy Regex match Regex.IsMatch(SID, @"^S-1-5-[0-9]+$") which searches for the String "S-1-5-" followed by numbers and an end after the numbers. User accounts SID are in a different format.
Screenshot 2022-12-01 131343
Super Grate - User Migration   Backup 01 12 2022 13_14_06

@krisdb2009
Copy link
Member

That will work for now, mind sending a pull request?

@Manschk3rl
Copy link
Contributor Author

Done.
But sure im up for the "Add Localization" projekt if you need help with german :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug There is a issue or error with Super Grate. enhancement New feature or request. todo Something to work on in the future.
Development

No branches or pull requests

2 participants