[Samba] Help removing many users

Ryan Novosielski novosirj at umdnj.edu
Fri Jan 4 21:40:21 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mike Eggleston wrote:
> On Fri, 04 Jan 2008, Ryan Novosielski might have said:
> 
>> Can anyone brighter than me think of an easy way to remove MANY users
>> from an smbpasswd file (I have a list of users that can be removed, some
>> of which may already be missing, some of which may be present)? I cannot
>> use smbpasswd -x in a loop. Is there some easy way to do this?
> 
> I'm aware that you cannot use smbpasswd in a loop creating the accounts
> because you have to type in the password, but removing the accounts? What's
> the issue with using smbpasswd in a loop to remove the accounts?

I actually thought of something that will work for this, but the
background of my situation is that my smbpasswd file has gotten too
large. It has gotten so large that it actually cannot be changed because
it is always locked for reading (too many clients, too large a file).
Therefore, I currently cannot change the file so smbpasswd -x fails.

What I'm trying now, that is working but is painfully slow, is copying
the smbpasswd file elsewhere and acting on the copy with smbpasswd -c
and -x. It will probably run half a day to remove thousands of people,
but we'll see.

- --
 ---- _  _ _  _ ___  _  _  _
 |Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Systems Programmer II
 |$&| |__| |  | |__/ | \| _| |novosirj at umdnj.edu - 973/972.0922 (2-0922)
 \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHfqfFmb+gadEcsb4RAtI+AJ4isi2gFAAIHkhqJjOTvfx6B35iZwCgsHvs
geidnzAVXiJaqFlqlPH+fqw=
=R66o
-----END PGP SIGNATURE-----


More information about the samba mailing list