bug-sh-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: su - bug ?


From: Bob Proulx
Subject: Re: su - bug ?
Date: Sun, 29 Apr 2001 14:57:37 -0600

> Both username hehe and #hehe don't exist 
> 
> address@hidden freax]$ su hehe
> su: user hehe does not exist
> address@hidden freax]$ su #hehe
> Password: 
> su: incorrect password
> address@hidden freax]$ 

Thanks for the report.  But that is not a bug.  The behavior you
report has nothing to do with su and everything to do with the command
line shell.  The '#' is normally a comment character with most command
line shells.

Therefore the su command is not seeing the string '"su" "#hehe"' it is
seeing only the "su" and the rest of the line is commented out.

Try using "echo" to verify the behavior.

  address@hidden bob]$ echo su hehe
  su hehe
  address@hidden bob]$ echo su #hehe
  su

If you really want to pass a command a string which contains shells
metacharacters then you need to quote the string.

  address@hidden bob]$ su '#hehe'
  su: user #hehe does not exist

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]