I do not believe it is grammatical, and it certainly is not idiomatic. It will, nevertheless, probably be understood by most people despite its oddity.
One shouldn’t give due credit unless is given likewise
is definitely ungrammatical because the clause introduced by “unless” has no subject. People might puzzle out what was intended, but they might not.
The version adding “one” after “unless” eliminates that grammatical lapse, but seems to mean
A person should not give due credit to any other person unless the first person receives due credit from every other person.
I doubt that is what is intended, and different people are likely to interpret it differently. The problems are that “one” is an indefinite pronoun (and consequently little used in modern American English), that the indirect object is omitted in the main clause, and that the use of the passive in the subordinate clause leaves the actor unknown. Here is an idiomatic way to say what I think you intend
No one should give credit to anyone who does not give due credit to others.