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

Changing username when connecting to Ghidra server #43

Closed
flux1on opened this issue Mar 6, 2019 · 5 comments
Closed

Changing username when connecting to Ghidra server #43

flux1on opened this issue Mar 6, 2019 · 5 comments
Labels
Type: Question Further information is requested

Comments

@flux1on
Copy link

flux1on commented Mar 6, 2019

Currently, Ghidra seems to default to using your current account name when connecting to a Ghidra server instance even if you specify the -u option in the server.conf file.

@flux1on flux1on added the Type: Question Further information is requested label Mar 6, 2019
@ghost
Copy link

ghost commented Mar 7, 2019

That is the correct option. Be sure you order and number the config parameters:

wrapper.app.parameter.1=-a0
wrapper.app.parameter.2=-u
wrapper.app.parameter.3=${ghidra.repositories.dir}

@flux1on
Copy link
Author

flux1on commented Mar 7, 2019

I was originally testing it without any authentication (no -a option). Does the -u option only work if you have some form of authentication?

@ghost
Copy link

ghost commented Mar 7, 2019

No authentication avoids the prompting, so no way to enter a different name.

@flux1on
Copy link
Author

flux1on commented Mar 7, 2019

Okay, thanks for the clarification.

@wyattearp
Copy link

wyattearp commented Jan 28, 2025

Should anyone else come across this, what's happening internally is that the Ghidra client is selecting the System.getProperty('user.name') from the JVM and using that as a default for authentication. You can see an example of this here:

userName = getCleanUserName(System.getProperty("user.name"));

If you're in need of a workaround (let's say you're authenticating across computer domains for some reason), you can manually modify the ./support/launch.properties to override this value as follows:

# ... 
# ...
# ... 

# Set default encoding to UTF8
VMARGS=-Dfile.encoding=UTF8

# Set locale (only en_US is supported)
VMARGS=-Duser.country=US
VMARGS=-Duser.language=en
VMARGS=-Duser.variant=

# add a new JVM defined argument to overwrite System.getProperty('user.name')
VMARGS=-Duser.name=wyattearp

Tested and functions on Ghidra 11.2.1 with basic authentication - your mileage might vary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants