osty
Posts: 3
Joined: Wed Oct 16, 2013 4:20 pm

Change login name of the PI

Fri Dec 02, 2016 6:11 am

When I want to enter the PI I you see following
login as: pi
pi@192.16x.x.xxx's password:

Is their a way to change the "pi@192.16x.x.xxx's" to a NAME?

Thanks for your advice
Osty

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Change login name of the PI

Fri Dec 02, 2016 10:55 am

That's because the machine you're connecting from can't resolve the name for your RPi.

Some home routers will run a DNS or mDNS (aka Bonjour) server and allow you to use hostname.lan or hostname.local names. Otherwise you'll need to run bind9 or dnsmasq on your RPi to provide a local resolver.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
allfox
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: Change login name of the PI

Fri Dec 02, 2016 3:02 pm

And if you want to change the name of "pi", try these:

1 Enable root account. Not only giving the root a password, but also if I remember correctly, that now the sshd config do not allow remote root login, you need some change to it.

2 Login as root.

3 "usermod -l login-name old-name", so change "pi" to "greater" would be "usermod -l greater pi"

4 Logout. Then login as "greater".

5 Disable root account.

osty
Posts: 3
Joined: Wed Oct 16, 2013 4:20 pm

Re: Change login name of the PI

Sun Dec 04, 2016 4:05 pm

Great, Thanks will try it

Return to “General discussion”