You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Paul Sundling (JIRA)" <ji...@apache.org> on 2007/09/26 15:55:50 UTC

[jira] Created: (SOLR-365) improper handling of user login greater than 8 characters

improper handling of user login greater than 8 characters
---------------------------------------------------------

                 Key: SOLR-365
                 URL: https://issues.apache.org/jira/browse/SOLR-365
             Project: Solr
          Issue Type: Bug
          Components: replication
         Environment: linux and probably other unix operating systems
            Reporter: Paul Sundling
            Priority: Minor


to reproduce, create a user account that is more than 8 characters long.  Then try to do a command like snappuller and even though the config is setup properly, it attempts to do a sudo.  The reason is that  2 different methods are used to calculate the user, one of which truncates accounts to 8 characters.

While user logins used to be limited to 8 characters, this may not be the case on modern UNIX.  

Here is a snippet I get by adding the -x debug flag to bash.  Note how oldwhoami is a truncated version (psundlin) of the full login (psundling).

+ fixUser
+ [[ -z psundling ]]
++ whoami
+ [[ psundling != psundling ]]
++ who -m
++ cut '-d ' -f1
++ sed '-es/^.*!//'
+ oldwhoami=psundlin
+ [[ psundlin == '' ]]


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-365) improper handling of user login greater than 8 characters

Posted by "Paul Sundling (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530598 ] 

Paul Sundling commented on SOLR-365:
------------------------------------

Actually the one place where you do have a bug of sorts is improper logging.  

Since oldwhoami uses the truncated command, it improperly logs it as 'psundlin' instead of 'psundling'.  So it is a bug after all, just a trivial one.

i.e. for user account psundling:

2007/09/26 22:44:18 started by psundlin

> improper handling of user login greater than 8 characters
> ---------------------------------------------------------
>
>                 Key: SOLR-365
>                 URL: https://issues.apache.org/jira/browse/SOLR-365
>             Project: Solr
>          Issue Type: Bug
>          Components: replication
>         Environment: linux and probably other unix operating systems
>            Reporter: Paul Sundling
>            Priority: Minor
>
> to reproduce, create a user account that is more than 8 characters long.  Then try to do a command like snappuller and even though the config is setup properly, it attempts to do a sudo.  The reason is that  2 different methods are used to calculate the user, one of which truncates accounts to 8 characters.
> While user logins used to be limited to 8 characters, this may not be the case on modern UNIX.  
> Here is a snippet I get by adding the -x debug flag to bash.  Note how oldwhoami is a truncated version (psundlin) of the full login (psundling).
> + fixUser
> + [[ -z psundling ]]
> ++ whoami
> + [[ psundling != psundling ]]
> ++ who -m
> ++ cut '-d ' -f1
> ++ sed '-es/^.*!//'
> + oldwhoami=psundlin
> + [[ psundlin == '' ]]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-365) improper handling of user login greater than 8 characters

Posted by "Bill Au (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530711 ] 

Bill Au commented on SOLR-365:
------------------------------

Paul, what OS are you running?  The who command on Red Hat Linux does not seems to have this problem.

> improper handling of user login greater than 8 characters
> ---------------------------------------------------------
>
>                 Key: SOLR-365
>                 URL: https://issues.apache.org/jira/browse/SOLR-365
>             Project: Solr
>          Issue Type: Bug
>          Components: replication
>         Environment: linux and probably other unix operating systems
>            Reporter: Paul Sundling
>            Priority: Minor
>
> to reproduce, create a user account that is more than 8 characters long.  Then try to do a command like snappuller and even though the config is setup properly, it attempts to do a sudo.  The reason is that  2 different methods are used to calculate the user, one of which truncates accounts to 8 characters.
> While user logins used to be limited to 8 characters, this may not be the case on modern UNIX.  
> Here is a snippet I get by adding the -x debug flag to bash.  Note how oldwhoami is a truncated version (psundlin) of the full login (psundling).
> + fixUser
> + [[ -z psundling ]]
> ++ whoami
> + [[ psundling != psundling ]]
> ++ who -m
> ++ cut '-d ' -f1
> ++ sed '-es/^.*!//'
> + oldwhoami=psundlin
> + [[ psundlin == '' ]]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-365) improper handling of user login greater than 8 characters

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530510 ] 

Hoss Man commented on SOLR-365:
-------------------------------

This is ... odd.  Solr isn't making any assumptions about the length of the user name.

Paul: what does the output of "who | grep psund " on your system print?



> improper handling of user login greater than 8 characters
> ---------------------------------------------------------
>
>                 Key: SOLR-365
>                 URL: https://issues.apache.org/jira/browse/SOLR-365
>             Project: Solr
>          Issue Type: Bug
>          Components: replication
>         Environment: linux and probably other unix operating systems
>            Reporter: Paul Sundling
>            Priority: Minor
>
> to reproduce, create a user account that is more than 8 characters long.  Then try to do a command like snappuller and even though the config is setup properly, it attempts to do a sudo.  The reason is that  2 different methods are used to calculate the user, one of which truncates accounts to 8 characters.
> While user logins used to be limited to 8 characters, this may not be the case on modern UNIX.  
> Here is a snippet I get by adding the -x debug flag to bash.  Note how oldwhoami is a truncated version (psundlin) of the full login (psundling).
> + fixUser
> + [[ -z psundling ]]
> ++ whoami
> + [[ psundling != psundling ]]
> ++ who -m
> ++ cut '-d ' -f1
> ++ sed '-es/^.*!//'
> + oldwhoami=psundlin
> + [[ psundlin == '' ]]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-365) improper handling of user login greater than 8 characters

Posted by "Paul Sundling (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530596 ] 

Paul Sundling commented on SOLR-365:
------------------------------------

 It seems the fact that logins with 9 characters or longer are truncated by to 8 characters by some  unix commands was a red herring.  It wasn't actually a problem after all.  You can reclassify it as not a bug and close it.  Apologies for the false alarm.

> improper handling of user login greater than 8 characters
> ---------------------------------------------------------
>
>                 Key: SOLR-365
>                 URL: https://issues.apache.org/jira/browse/SOLR-365
>             Project: Solr
>          Issue Type: Bug
>          Components: replication
>         Environment: linux and probably other unix operating systems
>            Reporter: Paul Sundling
>            Priority: Minor
>
> to reproduce, create a user account that is more than 8 characters long.  Then try to do a command like snappuller and even though the config is setup properly, it attempts to do a sudo.  The reason is that  2 different methods are used to calculate the user, one of which truncates accounts to 8 characters.
> While user logins used to be limited to 8 characters, this may not be the case on modern UNIX.  
> Here is a snippet I get by adding the -x debug flag to bash.  Note how oldwhoami is a truncated version (psundlin) of the full login (psundling).
> + fixUser
> + [[ -z psundling ]]
> ++ whoami
> + [[ psundling != psundling ]]
> ++ who -m
> ++ cut '-d ' -f1
> ++ sed '-es/^.*!//'
> + oldwhoami=psundlin
> + [[ psundlin == '' ]]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-365) improper handling of user login greater than 8 characters

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530625 ] 

Hoss Man commented on SOLR-365:
-------------------------------

as your second comment shows: it's "who" that's doing the truncating ... whoami can't be used in this context because the point is to get the *real* user in the case that sudo is being used (who -m will tell you that, whoami won't).

i'm not sure that there's anything we can do about the behavior of who, but it certainly doesn't hurt ot leave this issue open in case anyone else has a similar question (or a suggested solution)

> improper handling of user login greater than 8 characters
> ---------------------------------------------------------
>
>                 Key: SOLR-365
>                 URL: https://issues.apache.org/jira/browse/SOLR-365
>             Project: Solr
>          Issue Type: Bug
>          Components: replication
>         Environment: linux and probably other unix operating systems
>            Reporter: Paul Sundling
>            Priority: Minor
>
> to reproduce, create a user account that is more than 8 characters long.  Then try to do a command like snappuller and even though the config is setup properly, it attempts to do a sudo.  The reason is that  2 different methods are used to calculate the user, one of which truncates accounts to 8 characters.
> While user logins used to be limited to 8 characters, this may not be the case on modern UNIX.  
> Here is a snippet I get by adding the -x debug flag to bash.  Note how oldwhoami is a truncated version (psundlin) of the full login (psundling).
> + fixUser
> + [[ -z psundling ]]
> ++ whoami
> + [[ psundling != psundling ]]
> ++ who -m
> ++ cut '-d ' -f1
> ++ sed '-es/^.*!//'
> + oldwhoami=psundlin
> + [[ psundlin == '' ]]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-365) improper handling of user login greater than 8 characters

Posted by "Paul Sundling (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531690 ] 

Paul Sundling commented on SOLR-365:
------------------------------------

$ cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 5)

$ which who
/usr/bin/who

$ rpm -qf /usr/bin/who
coreutils-5.2.1-31.6

So apparently at least some Red Hat versions do have this problem.  The commands above show the version of Red Hat and the rpm package this version of who comes from.  I can't get more specific than that. :)


> improper handling of user login greater than 8 characters
> ---------------------------------------------------------
>
>                 Key: SOLR-365
>                 URL: https://issues.apache.org/jira/browse/SOLR-365
>             Project: Solr
>          Issue Type: Bug
>          Components: replication
>         Environment: linux and probably other unix operating systems
>            Reporter: Paul Sundling
>            Priority: Minor
>
> to reproduce, create a user account that is more than 8 characters long.  Then try to do a command like snappuller and even though the config is setup properly, it attempts to do a sudo.  The reason is that  2 different methods are used to calculate the user, one of which truncates accounts to 8 characters.
> While user logins used to be limited to 8 characters, this may not be the case on modern UNIX.  
> Here is a snippet I get by adding the -x debug flag to bash.  Note how oldwhoami is a truncated version (psundlin) of the full login (psundling).
> + fixUser
> + [[ -z psundling ]]
> ++ whoami
> + [[ psundling != psundling ]]
> ++ who -m
> ++ cut '-d ' -f1
> ++ sed '-es/^.*!//'
> + oldwhoami=psundlin
> + [[ psundlin == '' ]]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-365) improper handling of user login greater than 8 characters

Posted by "Paul Sundling (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530556 ] 

Paul Sundling commented on SOLR-365:
------------------------------------

$ who | grep psund
psundlin pts/2        Sep 26 02:37 (ssundling.company.com)

$ whoami
psundling

$ who am i
psundlin pts/2        Sep 26 02:37 (ssundling.company.com)



> improper handling of user login greater than 8 characters
> ---------------------------------------------------------
>
>                 Key: SOLR-365
>                 URL: https://issues.apache.org/jira/browse/SOLR-365
>             Project: Solr
>          Issue Type: Bug
>          Components: replication
>         Environment: linux and probably other unix operating systems
>            Reporter: Paul Sundling
>            Priority: Minor
>
> to reproduce, create a user account that is more than 8 characters long.  Then try to do a command like snappuller and even though the config is setup properly, it attempts to do a sudo.  The reason is that  2 different methods are used to calculate the user, one of which truncates accounts to 8 characters.
> While user logins used to be limited to 8 characters, this may not be the case on modern UNIX.  
> Here is a snippet I get by adding the -x debug flag to bash.  Note how oldwhoami is a truncated version (psundlin) of the full login (psundling).
> + fixUser
> + [[ -z psundling ]]
> ++ whoami
> + [[ psundling != psundling ]]
> ++ who -m
> ++ cut '-d ' -f1
> ++ sed '-es/^.*!//'
> + oldwhoami=psundlin
> + [[ psundlin == '' ]]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.