Saturday, January 8, 2011

SAMBA configuration under LINUX8.0 method (2)

To modify the registry on win9x machines: OHKEY_LOCAL_MACHINE\SYSTEM\Currentcontrolset\Services\Kdr\Parameters Win98 WinNT: HKEY_LOCAL_MACHINE\SYSTEM\Currentcontrolset\Services\Vxd\vnetsup Win2000: HKEY_LOCAL_MACHINE\SYSTEM\Currentcontrolset\Services\LanmanWorkstation\Parameters here append key: key name EnablePlainTextpasswd, value type is DWORD, a value of 1, this is mainly because samba cannot restore the encryption password, so that registration is not successful, the modified.

Click on the my network places, add NETBEUI protocol, TCP/IP Protocol, the Microsoft network users, if you use the DNS you want to type the IP address of the DNS. From the Control Panel, click user, add an existing user in Linux, and Linux system users and passwords, restart the computer for Linux users to log in to see the Linux machine. Implementation of netstat-A192.168.7.148 (or host name) in the Linux machines do the smbclient-L//server smbclient\\\\server\\ shared directory accessible win9x resource, but not copy. Create a directory to implement smbmount\\\\server\\/mnt/smb shared directory/mnt/smb accessible win9x resource, and be able to perform the CP command. Smbumount/mnt/smb hanging point fails. If you want Linux startup win9x machines you can see, shall deal with: Configure/etc/rc.d/init.d/smb script, configuration file as follows: #!/bin/s ## chkconfig:-9135 # description: startsandstopsthesambasmbdandnmbddaemons\ # usedtoprovideSMBnetworkservices # # pidfile:/var/run/samba/smbd.pid # pidfile:/var/run/samba/nmbd.pid # config:/etc/samba/sourcefunctionlibrary smb.con # if [-f/etc/init.d/functions]:/etc/init.d/functions ten. elif [-f/etc/rc.d/init.d/functions]: ten-I #/etc/rc.d/init.d/functions else exit0 Avoidusingroot ' sTMPDIR unsetTMPDIR # sourcenetworkingconfiguration./etc/sysconfig/network if [-f/etc/sysconfig/samba]: ten-/etc/sysconfig/samba I # checkthatnetworkingisup [$ {NETWORKING} = "no"] & & exit0 # checkthatsmb.confexists [-f/etc/samba/sb.conf] || exit0  #checkthatwecanwritetoit…sonon-rootusersstoper  [-w/etc/samba/smb.conf]|| exit0  RETVAL=0  start(){  echo–n$”startingSMBservices:”  daemon/usr/sbin/smbd–D  RETVAL=$? eco  echo–n$“startingNMBservices:”  daemon/usr/sbin/nmbd–D  RETVAL2=$? Eco  [$RETVAL–eqo–a$RETVAL2–eqo]&&touch/var/lock/subsys/smb|| \  RETVAL=1  return$RETVAL  }  stop(){  echo–n$”shuttingdownSMBservices:”  killproc/usr/sbin/smbd  RETVAL=$? eco  echo–n$”shuttingdownNMBservices:”  killproc/usr/sbin/nmbd  RETVAL2=$? [$RETVAL–eq0–a$RETVAL2eq0]&&rm–f/var/lock/subsys/smb  echo“”  return$RETVAL}  restart(){  $0stop  $0start  RETVAL=$? }  reload(){  echo–n$”Reloadingsmb.conffile:”  killproc–HUP/usr/sbin/smbd  RETVAL=$? Eco  Return$RETVAL  }  rhstatus(){  status/usr/sbin/smbd  status/usr/sbin/nmbd  RETVAL=$? }  case“$1”in  start)  start  ::  stop)  stop  ::  restart)  restart  ::  reload)  reload  ::  status)  rhstatus  ::  condrestart)  [-f/var/lock/subsys/smb]&&restart||:  ::  *)  echo$“Usage:$0{start|stop|restart|reload|status|condrestart}”  exit1  esac  exit$? And then at the command line execution chmod700/etc/rc.d/init.d/smb chkconfig--addsmb/etc/pam.d/samba file add chkconfig--level345smbon configuration: Authrequired/lib/security/pam_pwdb.sonulloksadow Accountrequired/lib/security/pam_pwdb.so configuration/etc/logrotate.d/samba file/var/log/samba/log.nmdb {notifempty missingok postrotate/usr/bin/killall – HUPnmbd endrotate}/var/log/samba/log.smbd {notifempty missingok postrotate/usr/bin/killall – HUPsmbd endrotate}

No comments:

Post a Comment