Let F-q be the finite field of q elements and a(1), a(2), ..., a(k), b is an element of F-q. We investigate N-Fq (a(1), a(2), ..., a(k); b), the number of ordered solutions (x(1), x(2), ..., x(k)) is an element of F-q(k) of the linear equation a(1)x(1) + a(2)x(2) + ... + a(k)x(k) = b with all x(i) distinct. We obtain an explicit formula for N-Fq (a(1), a(2), ..., a(k); b) involving combinatorial numbers de- pending on a(i)'s. In particular, we obtain closed formulas for two special cases. One is that a(i), 1 <= i <= k take at most three distinct values and the other is that Sigma(k)(i=1) a(i) = 0 and Sigma(i is an element of I) a(i) not equal 0 for any I subset of {1, 2, ... , k}. The same technique works when F-q is replaced by Z(n), the ring of integers modulo n. In particular, we give a new proof for the main result given by Bibak, Kapron and Srinivasan ([2]), which generalizes a theorem of Schonemann via a graph theoretic method. (C) 2019 Elsevier Inc. All rights reserved.