To greet somebody by bowing is unlawful, regardless whether that person is a Muslim or a disbeliever, and regardless whether you bow with your entire upper body or with your head only. This is because bowing is a kind of worship, and worship is for Allaah Almighty alone. May Allaah send peace and blessing upon Muhammad, his family, and his Companions.