Author Topic: Samba 3.0.28  (Read 6518 times)

devon

  • Full Member
  • ***
  • Posts: 98
  • Karma: 4
    • View Profile
Samba 3.0.28
« on: August 28, 2009, 05:09:45 AM »
Samba, slimmed down for Askozia. Package contains binaries smbd, nmbd, smbpasswd, testparm and 9 libraries. Installed size is ~9mb.

1. Install and activate the package

2. set root  smb user and password
   #/usr/local/bin/smbpasswd -a

3. define shares in /usr/local/etc/smb.conf
   (no shares are enabled by default, examples are included in smb.conf)

4. let samba know to re-read config
   # killall -HUP smbd

Download 3.7mb zip or package

Cheers

devon

  • Full Member
  • ***
  • Posts: 98
  • Karma: 4
    • View Profile
Re: Samba 3.0.28
« Reply #1 on: September 21, 2009, 05:11:33 AM »
samba_0.1.1.pbxpkg

Added code to create logfile directory /var/log/samba when samba loads.

Download 3.7mb zip or package

devon

  • Full Member
  • ***
  • Posts: 98
  • Karma: 4
    • View Profile
Re: Samba 3.0.28
« Reply #2 on: October 08, 2009, 02:33:54 AM »

samba_0.1.2.pbxpkg

Added webgui page to edit smb.conf and buttons to  stop, start and restart Samba.
Added 'mangled names = No' in smb.conf global section (if upgrading, you'll need to add the line manually)
Added function to show smbd and nmbd running status.


Download 3.7mb zip or package

To do: user management? swat?

EdZa

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Samba 3.0.28
« Reply #3 on: March 18, 2010, 02:27:46 PM »
2. set root  smb user and password
   #/usr/local/bin/smbpasswd -a

I have create new user. adduser not run.
How create new user without edit etc/passwd ?

devon

  • Full Member
  • ***
  • Posts: 98
  • Karma: 4
    • View Profile
Re: Samba 3.0.28
« Reply #4 on: March 19, 2010, 04:10:21 AM »
How create new user without edit etc/passwd ?

One could create the user with the pw command line utilty, which is included with the inetd package.

In this example, user edward is created with shell /bin/nologin and the operator is prompted to enter a password:

Code: [Select]
# pw useradd -n edward -s /bin/nologin -h 0

The user edward can then be added to the smb password file:

Code: [Select]
# /usr/local/bin/smbpasswd -a edward
Askozia's passwd files will revert after a reboot, but a script could be used to add the user at startup:

Code: [Select]
#!/usr/local/bin/php -f
<?php
$pw 
='password';
exec("echo ${pw} | pw useradd -n edward -s /bin/nologin -h 0");
?>


The downside here is that edward's password would be stored in plain text in the script, which is probably not a good idea. Pw can also accept an encrypted password:

Code: [Select]
#!/usr/local/bin/php -f
<?php
$pw 
='\$1\$jJ5uESX7\$ja4A5t4kYlxWM6Ri2Sp7q0';
exec("echo ${pw} | pw useradd -n edward -s /bin/nologin -H 0");
?>

(Please note that special characters have been escaped in the $pw string and the uppercase '-H')

More detailed information about the pw command can be found on the FreeBSD man page:
http://www.freebsd.org/cgi/man.cgi?pw
« Last Edit: March 19, 2010, 04:24:35 AM by devon »

EdZa

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Samba 3.0.28
« Reply #5 on: March 19, 2010, 05:42:00 AM »
Thank you very much