Does mksmbpasswd.sh have any real purpose?

Stephen L Arnold sarnold at coyote.rain.org
Sat Jun 5 06:19:32 GMT 1999


On 5 Jun 99, "Frank R. Brown" <list.Frank at MailAndNews.com> had 
questions about mksmbpasswd.sh:  

> I see that mksmbpasswd.sh (plus a little editing) would
> be a good way to set up users with "NO PASSWORD"
> in bulk.
> 
> But suppose I don't want the risk of the "NO PASSWORD"
> approach.  Now somebody with root access must run
> smbpasswd for each user they want to activate.  But can't
> I just do this anyway (with the -a 'add user' option), without
> ever having run mksmbpasswd.sh?
> 
> Please clue me in if I'm missing something here.

Here's the way I understand it: running samba without encrypted 
passwords uses the /etc/passwd (or /etc/shadow).  Running samba 
with encrypted passwords uses /etc/smbpasswd instead (due to the 
requirement for M$ hashed passwords).  Running the above shell 
script creates the /etc/smbpasswd file (ie, the same info that's 
contained in /etc/passwd) without any passwords in it (only XXXXX).

At this point, you can add real passwords to /etc/smbpasswd 
manually using (what else) smbpasswd.  Or you can set:
unix passwd sync = yes
and use the standard passwd command instead.  Or you can run:
update encrypted = yes
encrypted = no
and let each user login normally.  Once each user's password has 
been added to /etc/smbpasswd you switch to
update encrypted = no
encrypted = yes
and there you go.

I must be on a roll tonight (and the SciFi channel shows are re-
runs).  Steve

************************************************
Steve Arnold  CLE (Certifiable Linux Evangelist)
http://www.rain.org/~sarnold


More information about the samba mailing list