cygwin USER and USERNAME are different

1

I changed an account on a Windows 7 machine from 'user' to my own name, and after rebooting, my name is the value of the environment variable USERNAME. But USER is still set to 'user'.

How do I change that? Where does the value of USER come from?

$ set | egrep "USER=|USERNAME="
USER=user
USERNAME=warren

Warren Burstein

Posted 2014-07-15T00:26:11.593

Reputation: 13

Answers

2

Where does the value of USER come from?

Take a look in /etc/profile. You will find the following:

# Set the user id
USER="$(/usr/bin/id -un)"

id gets it's data from /etc/passwd

DavidPostill

Posted 2014-07-15T00:26:11.593

Reputation: 118 938