diff options
Diffstat (limited to 'perl-install/network/smb.pm')
-rw-r--r-- | perl-install/network/smb.pm | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/perl-install/network/smb.pm b/perl-install/network/smb.pm index 941463c65..4ef3f45a4 100644 --- a/perl-install/network/smb.pm +++ b/perl-install/network/smb.pm @@ -42,7 +42,7 @@ sub smbclient { my $group = $server->{group} ? " -W $server->{group}" : ''; my $U = $server->{username} ? sprintf("%s/%s%%%s", @$server{'domain', 'username', 'password'}) : '%'; - `smbclient -U $U -L $name $ip$group`; + `smbclient -U $U -L $name $ip$group 2>/dev/null`; } sub find_servers { @@ -178,4 +178,34 @@ sub write_smb_conf { "); } +sub write_smb_ads_conf { + my ($domain, $realm) = @_; + + #- was going to just have a canned config in samba-winbind + #- and replace the domain, but sylvestre/buchan didn't bless it yet + + my $f = "$::prefix/etc/samba/smb.conf"; + rename $f, "$f.orig"; + output($f, " +[global] + workgroup = $domain + realm = $realm + server string = Samba Member %v + security = ads + encrypt passwords = Yes + password server = * + log file = /var/log/samba/log.%m + max log size = 50 + socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 + os level = 18 + local master = No + dns proxy = No + winbind uid = 10000-20000 + winbind gid = 10000-20000 + winbind separator = + + template homedir = /home/%D/%U + template shell = /bin/bash + winbind use default domain = yes +"); +} 1; |