I'm primarily a
User Developer Sysadmin A mixture Something else entirely .. ( 514 votes ~ 10 comments )
You are not currently logged in. If you do not have a user account then please consider creating one and logging in before you post your comment. This will allow you to track replies to your comment, and take part in the site much more freely.
To add your comment, fill in all the boxes below and then preview it to make sure you're happy with the way that it looks.
This is the comment you were replying to, attached to the article MIT Kerberos installation on Debian:
#10 Re: MIT Kerberos installation on Debian Posted by daemon (146.231.xx.xx) on Mon 17 Dec 2007 at 14:06 This is not really the place, I guess, because it's not really directly related to the article (which is very nice bye the way, even if I do prefer Heimdal ;-) What's odd though, is if I run this commandline: su -c 'echo -e "\$USER:\t\t\"$USER\"\n\$USERNAME:\t\"$USERNAME\"\n\$LOGNAME:\t\"$LOGNAME\"\n"' on different machines I get different results -- none of which match up to what's in the article, so we have at least three different outcomes from a set of different boxes. The version of Bash seems to play it's part. I have a Sarge box which gives me this: ~$echo $BASH_VERSION 2.05b.0(1)-release ~$su -c 'echo -e "\$USER:\t\t\"$USER\"\n\$USERNAME:\t\"$USERNAME\"\n\$LOGNAME:\t\"$LOGNAME\"\n"' Password: <enter password here> $USER: "root" $USERNAME: "" $LOGNAME: "myusername" But, on both a Lenny box with $BASH_VERSION = 3.1.17(1)-release and a Kubuntu box with @$BASH_VERSION = 3.2.13(1)-release" I get: ~$su -c 'echo -e "\$USER:\t\t\"$USER\"\n\$USERNAME:\t\"$USERNAME\"\n\$LOGNAME:\t\"$LOGNAME\"\n"' Password: <enter password here> $USER: "root" $USERNAME: "" $LOGNAME: "root" All of which suggest a different behaviour to that mentioned in the article and the authors comments so far. Which leads to hmmmmm ..... Followed by the realisation that in this case, it's probably better to just use su - and used visudo, which is the preferred method anyway as there are stark warnings about editing your sudoers file directly ;-)
This is not really the place, I guess, because it's not really directly related to the article (which is very nice bye the way, even if I do prefer Heimdal ;-)
What's odd though, is if I run this commandline:
su -c 'echo -e "\$USER:\t\t\"$USER\"\n\$USERNAME:\t\"$USERNAME\"\n\$LOGNAME:\t\"$LOGNAME\"\n"'
on different machines I get different results -- none of which match up to what's in the article, so we have at least three different outcomes from a set of different boxes.
The version of Bash seems to play it's part. I have a Sarge box which gives me this:
~$echo $BASH_VERSION 2.05b.0(1)-release ~$su -c 'echo -e "\$USER:\t\t\"$USER\"\n\$USERNAME:\t\"$USERNAME\"\n\$LOGNAME:\t\"$LOGNAME\"\n"' Password: <enter password here> $USER: "root" $USERNAME: "" $LOGNAME: "myusername"
~$echo $BASH_VERSION
2.05b.0(1)-release
~$su -c 'echo -e "\$USER:\t\t\"$USER\"\n\$USERNAME:\t\"$USERNAME\"\n\$LOGNAME:\t\"$LOGNAME\"\n"'
Password: <enter password here>
$USER: "root"
$USERNAME: ""
$LOGNAME: "myusername"
But, on both a Lenny box with $BASH_VERSION = 3.1.17(1)-release and a Kubuntu box with @$BASH_VERSION = 3.2.13(1)-release" I get:
$BASH_VERSION = 3.1.17(1)-release
~$su -c 'echo -e "\$USER:\t\t\"$USER\"\n\$USERNAME:\t\"$USERNAME\"\n\$LOGNAME:\t\"$LOGNAME\"\n"' Password: <enter password here> $USER: "root" $USERNAME: "" $LOGNAME: "root"
$LOGNAME: "root"
All of which suggest a different behaviour to that mentioned in the article and the authors comments so far.
Which leads to hmmmmm ..... Followed by the realisation that in this case, it's probably better to just use su - and used visudo, which is the preferred method anyway as there are stark warnings about editing your sudoers file directly ;-)
su -
visudo
Posting Format:
Inappropriate comments will be removed.
Some help on entry formatting is available
Username:
Password:
[ Advanced Login ]
Register Account