How do i change my display name in Linux without adminstrator privileges?

0

1

I recently got an account in a network, and the administrator misspelled my name. Is there a way to change it on my own?

Mids

Posted 2015-08-22T20:52:00.623

Reputation: 27

Any reason you can't simply as the administrator to change it for you? – Tom Carpenter – 2015-08-22T21:11:04.040

You should definitely ask the administrator. – Michael Bailey – 2015-08-22T21:12:01.993

Answers

2

No. Accounts can be modified by the usermod command (for example for changing your username you'll run usermod -l new_name current_name) which can be run only by superuser.

Also, you shouldn't be logged in when changing your username. Actually, you probably even can't be logged in, since usermod will fail if any process is run under your username.


EDIT: I didn't notice your title and automatically thought of changing username, not display name. I will leave that part here since it might help someone.

You can change your display name using usermod -c while being logged in, but you still need to have root access in order to run usermod.

However, display names can be changed also by chfn -f new_name. The command itself doesn't need privileged user, but it might fail depending on /etc/login.defs configuration for CHFN_RESTRICT (and in order to change the file, you also need superuser access).

Adalee

Posted 2015-08-22T20:52:00.623

Reputation: 312

Yes, i suspected that, but i wanted to be sure. Thank you anyway. – Mids – 2015-08-22T21:20:00.473

Sorry, while this is a good answer, it's still got more wrong than right. usermod has nothing to do with domain accounts, it is limited to /etc/passwd only (one would use LDAP to edit LDAP accounts, for example), and it works fine when you're logged in (unless you're trying to change your username or UID – but the original question is not about the username, it specifically says display name). – user1686 – 2015-08-22T21:41:37.377

@grawity Thank you for pointing things out - I assumed only /etc/passwd entries, of course using any other identity provider would need a specific command (but I didn't see any mention of that in the post). On the other hand, I am completely blind and by reading 'name' I automatically thought of username, not display name - now I see it's even in the title! Will adjust answer to that. – Adalee – 2015-08-22T22:03:44.070

Well usually "account on the network" sorta implies LDAP / AD / NIS. Though I misread the question as saying "domain account", which would imply that more strongly. – user1686 – 2015-08-22T22:33:25.673

1

No, and also proactive actions may not be appreciated by the IT guy (maybe there's dependent apps or documentation to be filled) so I'd encourage you to ask them.

Michael Bailey

Posted 2015-08-22T20:52:00.623

Reputation: 320

-1

Try this

usermod -l newname oldname

Charlie Piks

Posted 2015-08-22T20:52:00.623

Reputation: 1

2Doesn't work - requires root (su) access. – DavidPostill – 2015-08-22T21:08:57.183