Last modified: 2014-03-23 06:01:21 UTC
local-betacommand-dev@tools-login:~$ cd svn_copy local-betacommand-dev@tools-login:/data/project/betacommand-dev/svn_copy$ as soon as you leave the root of $HOME the full path is displayed. Traditionally /data/project/betacommand-dev (in my case) is just displayed as ~ while SSHing. Right now between the username/hostname/directory half my terminal is eaten
This is confined to tool accounts and the first prompt after become'ing a tool account seems to work: | local-wikilint@tools-login:~$ PS1='\w: ' | ~: cd cgi-bin | /data/project/wikilint/cgi-bin: cd | /data/project/wikilint: Further digging indicates that the trailing slash in $HOME is the culprit: | /data/project/wikilint: echo $HOME | /data/project/wikilint/ | /data/project/wikilint: HOME=/data/project/wikilint | ~: cd cgi-bin | ~/cgi-bin: I don't know if there is a deeper reasoning behind that slash or if that was just an oversight, but fixing this probably requires fiddling with the LDAP database.
Changing the homes in LDAP might be more involved than necessary (and may have side effect). I did put a workaround in /etc/profile to strip the slash on login sessions.
Looking at <https://wikitech.wikimedia.org/w/index.php?title=Special:NovaProject&action=configureproject&projectname=tools>, the service user homedir pattern is set to "/data/project/%u", so no trailing slashes shouldn't have a side effect. So we should just clean up the database once and remove the workaround then. Andrew, Ryan, we need: - For all service users in the Tools project, - if the homedir has a trailing slash, - remove it. Actual output at the moment is: | scfc@tools-login:~$ getent passwd local-wikilint | local-wikilint:x:50420:50420:local-wikilint:/data/project/wikilint/:/bin/bash | scfc@tools-login:~$ Expected output is: | scfc@tools-login:~$ getent passwd local-ggu | local-ggu:x:50961:50961:local-ggu:/data/project/ggu:/bin/bash | scfc@tools-login:~$
The move to eqiad has solved this: | scfc@tools-login:~$ getent passwd | grep '^tools\.' | cut -d : -f 6 | grep '/$' | scfc@tools-login:~$ The workaround is also gone, thus closing the bug.