Using the numerical method of Brandt (1998 Phys. Rev. B 58 6506), we study the penetration of a uniform magnetic field that is gradually applied parallel to the axis of finite type-II superconducting tubular samples with strong pinning. This study is carried out in view of designing low-frequency magnetic shields by exploiting the diamagnetic properties of type-II superconductors. First, we compare the field penetration into open and closed tubes. For long tubes (length larger than three times the outer diameter), we show that a cap weakly affects the maximum magnetic induction that can be shielded, but greatly increases the region over which the field is nearly uniform. When the length of the tube is shorter, both the maximum shieldable magnetic induction and the uniformity of the field attenuation are enhanced by closing the tube. We also show that making a hole in the cap, which is often necessary for applications, does not greatly affect the shielding properties provided the diameter of the hole is small compared to that of the tube (hole diameter smaller than a quarter of the outer tube diameter). In view of designing large size magnetic shields, superconducting tubes of finite size need to be joined together. We therefore examine in a second part how the presence of a non-superconducting joint between the tubes affects the shielding efficiency. It is shown that the effect of a joint depends upon its position along the tube axis and strongly increases with its size. Third, we study how non-uniform superconducting properties affect the shielding capabilities.