[Mageia-discuss] Feature request: uppercase letters in user names

Deri James deri at chuzzlewit.demon.co.uk
Wed Dec 14 17:58:48 CET 2011


On Wednesday 14 Dec 2011 16:38:34 nicolas vigier wrote:
> > >> From what he wrote, I get the impression he prefers to see iZoli,
> > >> rather than izoli, when working the CLI. Why not ?
> > > 
> > > Well, then just change the prompt, so it will display iZoli. Why do we
> > > need to support uppercase letters in user names for that?
> >
> > 
> >
> > Indeed. The uid is not meant to be the display name, unless by
> > default. Wondered if we had a better option than export FULLNAME=`grep
> > -e "^$USER:" /etc/passwd|gawk -F':' '{print $5}'` in .bash_profile?
> 
> getent passwd $USER | gawk -F':' '{print $5}'
> 
> so that it works if the account is not in /etc/passwd.

To get that into the CLI prompt do:-

export PS1="[`getent passwd $USER | gawk -F':' '{print $5}'`@\h \W]\$ "


-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-discuss/attachments/20111214/6e3ed1b5/attachment.html>


More information about the Mageia-discuss mailing list