Question about shares...

McEldowney, Michael MMcEldowney at deltaregional.com
Fri Jan 19 16:36:12 GMT 2001


Doing it here.  You need to dump your SAM with pwdump (check the
documentation for a link to download) from your NT PDC and paste it into
your smbpasswd file.  You have to be logged into your PDC as
Administrator to run pwdump.  I redirect the pwdump output to a file
(pwdump > samdump.txt). Then use a script like the one below to create
accounts for all of the users on your linux box.  I put all of my users
in the 'users' group (uid 100).  I created a separate group for my
machine accounts, called 'machines', with a uid of 500.  If you use
something different you'll need to modify the adduser lines in the
script below.

#!/usr/bin/perl -w

open(FILE1, "//etc//samba//smbpasswd");
open(FILE2, ">//etc//samba//importerrors.txt");
open(FILE3, ">//etc//samba//importresults.txt");

while ( $input = <FILE1> ) {

	if ( $input =~ /^(#|$)/ ) { next; } #ignore commented out or
blank lines
	($un, $uid, $therest) = split( /:/, $input );
	if ( $un =~ /^\d/ ) {
		print FILE2 "Cannot add user $un, the username must
start with an alpha character.\n";
	}
	elsif ( $un =~ /\s/ ) {
		print FILE2 "Cannot add user $un, the username must not
contain spaces.\n";
	}
	else {
		if ( $un =~ /\$$/ ) { #machine accounts need to be added
differently
			system("//usr//sbin//adduser -u $uid -g 500 -d
//dev//null -n $un");
			print FILE3 "Added machine $un.\n";
		}
		else {
			system("//usr//sbin//adduser -u $uid -g 100 -n
$un");
			print FILE3 "Added user $un.\n";
		}
	}
}

close FILE1;
close FILE2;
close FILE3;

Hope that helps...

M

-----Original Message-----
From: David BOURIAUD [mailto:david.bouriaud at ac-rouen.fr]
Sent: Friday, January 19, 2001 10:50 AM
To: samba at lists.samba.org
Subject: Question about shares...


Hi to all !
I'm confronted to the following problem :
I have a Linux box (SuSE 6.4 running kernel 2.2.14 & smb 2.0.7).
I have configured smb to be the master for domain named essaismb.
When I connect to this domain from a windows 98 box, it works fine.
However, all the PC that are in my firm are not (yet) configured 
to connect to this domain.
At that moment, they connect to a win NT 4.0 domain.

Is it possible to have shares from my Linux box accessible to all PC ?
I mean, is there a way to set up a guest share, that could be viewed 
from all PC ?
If yes, how could I do this ?
Thanks by advance !




More information about the samba mailing list