오프라인에서도 마지막에 서버에서 받은 것과 diff 할 수 있다!

2010.02.02 추가
(cvs에서는 온라인이 아니라면 비교해 볼수도 없다.)
2009/05/08 - [프로그램 사용/SVN/CVS] - SVN의 단점

Posted by 구차니
비슷비슷한 내용 -ㅁ-
anonymous / secure 설정에 대한 smb.conf의 예제들이 있다.

[링크 : http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/FastStart.html]
[링크 : http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/ref-guide/s1-samba-servers.html]

2009.12.24 추가
삼바 공식 smb.conf man page
[링크 : http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html]

smb.conf 한글 번역 내용 - oops.org
[링크 : http://sec.tistory.com/entry/smbconf-%EC%84%A4%EC%A0%95]
Posted by 구차니
서버 설정후 localhost에서 접속을 시도하려고
smbclient -L localhost 하는데 에러가 발생했다.

Server requested LANMAN password (share-level security) but 'client lanman auth' is disabled

일단 찾아봐도 딱히 답은 없지만..

아마도 security = SHARE 를 선택했을 경우, smb.conf에
client lanman auth = yes
lanman auth = yes
가 빠져 있으면 생기는 에러로 생각된다.

[링크 : http://sidux.com/PNphpBB2-viewtopic-t-14163.html]
Posted by 구차니
Upgrading from Samba-3.0.x to Samba-3.2.0
Upgrading from Samba-2.x to Samba-3.0.25

요런 내용이 있다.

3.0.25 는 3.0.x 이긴 하지만, 실질적으로 Samba2에 속하고
upgrade 시에 위에 보다시피 Samba2는 3.0.25를 거쳐 3.2.0 으로 업그레이드 가능하다.

Samba-3.0.25 default behavior should be approximately the same as Samba-2.2.x
보다시피 3.0.25는 2.2.x 대와 근원적으로 비슷하지만, 일종의 다리 역활로 samba3 에 속해있는 듯 하다.

[링크 : http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/upgrading-to-3.0.html]
Posted by 구차니
# smbd -S -F
smbd version 3.0.23c started.
Copyright Andrew Tridgell and the Samba Team 1992-2006
Unable to open printcap file /etc/printcap for read!
Unable to open printcap file /etc/printcap for read!
ERROR: Could not determine network interfaces, you must use a interfaces config line

3.2.0 에서는 이런게 없었는데..
아무튼 3.0.23c 에서는
smb.conf의 global 섹션에 interface가 있어야 한다.

[global]
    interface = eth0

[링크 : http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg223269.html]





./samba-3.0.23c/source/ 에서 아래의 명령을 실행하면 테스트 프로그램이 컴파일 된다.
gcc -g -o interfaces lib/interfaces.c -DAUTOCONF_TEST=1 -DHAVE_IFACE_IFCONF=1

[링크 : http://lists.samba.org/archive/samba-technical/2006-February/045430.html]
RE - [링크 : http://lists.samba.org/archive/samba-technical/2006-February/045440.html]
Posted by 구차니
머.. 어짜피 samba3 계열의 중간 다리를 하는 버전들이라 설치방법은 3.2.0 과 동일하다.

./samba-3.0.23c/source/ 에서
$ ./autogen.sh
$ export CC=<cross-compile-gcc>
$ ./configure --host=i686
$ make
$ make DESTDIR=<target_root_path> install

근데, 하다보면 에러난다.

Compiling lib/time.c
lib/time.c: In function `GetTimeOfDay':
lib/time.c:60: error: too few arguments to function `gettimeofday'

검색해보니, vi ./samba-3.0.23c/source/lib/time.c 의 60 라인에
gettimeofday(tval); 부분을
gettimeofday(tval,NULL);  이렇게 수정해주면된다.

  55 void GetTimeOfDay(struct timeval *tval)
  56 {
  57 #ifdef HAVE_GETTIMEOFDAY_TZ
  58         gettimeofday(tval,NULL);
  59 #else
  60         gettimeofday(tval);
  61 #endif
  62 }

이런 소스인데, HAVE_GETTIMEOFDAY_TZ 를 다른 곳에서 선언해주면 문제없이 될 듯 하다.


[링크 : http://www.nabble.com/3.0.21a-cross-compiling-%28uClibc%29-for-mipsel-fails-td2450460.html]
Posted by 구차니
한참을 잊고 있었던 것이 있는데..
삼바는 linux상에서 사용시에, user account(사용자 계정)가 리눅스 상에 존재해야 한다는 것이다.

[링크 : http://www.brennan.id.au/18-Samba.html]

# smbpasswd --help
smbpasswd: invalid option -- -
When run by root:
    smbpasswd [options] [username]
otherwise:
    smbpasswd [options]

options:
  -L                   local mode (must be first option)
  -h                   print this usage message
  -s                   use stdin for password prompt
  -c smb.conf file     Use the given path to the smb.conf file
  -D LEVEL             debug level
  -r MACHINE           remote machine
  -U USER              remote username
extra options when run by root or in local mode:
  -a                   add user
  -d                   disable user
  -e                   enable user
  -i                   interdomain trust account
  -m                   machine trust account
  -n                   set no password
  -W                   use stdin ldap admin password
  -w PASSWORD          ldap admin password
  -x                   delete user
  -R ORDER             name resolve order


/usr/local/samba/private/smbpasswd 라는 파일이 존재한다고 하는데, 버전별로 다른 듯 하다.
FC6의 삼바는 3.0.23 버전으로 smbpasswd 파일이
/etc/samba/passwd에 존재한다.

아무튼 별도로 관리하는 이유는, 해싱함수가 다르기 때문이라고 한다.
[링크 : http://coffeenix.net/doc/samba_guide/node18.html]
Posted by 구차니
속시원한 대답은 아니지만

smbd will not start, with the "ERROR: failed to setup guest info" error
(I have "guest account = guest", which is a valid user with correct info in LDAP):

[링크 : http://lists.samba.org/archive/samba/2006-June/121700.html]


기본값으로 설치한 경로인
/usr/local/samba/var/log.smbd 파일의 내용에 저러한 메시지를 출력하고
ps -ef | grep smbd 에 결과가 나오지 않는다면 guest user의 설정이 잘못된 것이 원인이라고 하는데
이렇게 smbd가 죽는것이 의도된 작동인지 애매모호하다.

smbpasswd -a <userid>

로 추가 가능하나,

Failed to add entry for user <userid>.

라고 나오면서 죽는건 대책이 없다.. 어떻게 해야 하나...
Posted by 구차니
프로그램 사용/vi2009. 9. 16. 10:39
VI를 넣고 안 넣고 차이에
busybox 실행 프로그램의 크기가 20kiB 정도 차이가 난다.(2010.01.28 수정 무슨 용량이 km야 ㄱ-)

-rwxrwxr-x 1 500      503        577016 Sep 16  2009 /bin/busybox
-rwxrwxr-x 1 500      503        597100 Sep 16  2009 /bin/busybox

20084 Byte > 19 KB

busybox가 대단한건지.. VI가 대단한건지...
어짜피 임베디드 리눅스에서 VI가 쓸일이 없다면 20KB라도 아끼자!



주의 : 위의 내용은 stripping 되었으며 sh4-linux 로 크로스 컴파일 된 크기 비교임,
         컴파일러에 따라 옵션에 따라 다를 수 있음

'프로그램 사용 > vi' 카테고리의 다른 글

VI 자동 줄 정렬  (0) 2009.10.06
vi auto indent  (0) 2009.10.06
vi 에서 대소문자 구분 하지 않고 검색하기 + 단어단위 검색  (0) 2009.09.02
VI에 ctags 사용하기  (0) 2009.07.21
VI syntax highlight 사용하기  (0) 2009.05.26
Posted by 구차니
$ tree /usr/local/samba/
/usr/local/samba/
|-- sbin
|   |-- nmbd
|   `-- smbd
|-- bin
|   |-- eventlogadm
|   |-- findsmb
|   |-- ldbadd
|   |-- ldbdel
|   |-- ldbedit
|   |-- ldbmodify
|   |-- ldbrename
|   |-- ldbsearch
|   |-- net
|   |-- nmblookup
|   |-- ntlm_auth
|   |-- pdbedit
|   |-- profiles
|   |-- rpcclient
|   |-- sharesec
|   |-- smbcacls
|   |-- smbclient
|   |-- smbcontrol
|   |-- smbcquotas
|   |-- smbget
|   |-- smbpasswd
|   |-- smbspool
|   |-- smbstatus
|   |-- smbtar
|   |-- smbtree
|   |-- tdbbackup
|   |-- tdbdump
|   |-- tdbtool
|   `-- testparm
|-- include
|   |-- libsmbclient.h
|   |-- netapi.h
|   |-- smb_share_modes.h
|   |-- talloc.h
|   `-- tdb.h
|-- lib
|   |-- auth
|   |-- charset
|   |-- gpext
|   |-- idmap
|   |-- lmhosts
|   |-- lowcase.dat
|   |-- nss_info
|   |-- pdb
|   |-- perfcount
|   |-- rpc
|   |-- smb.conf
|   |-- upcase.dat
|   |-- valid.dat
|   `-- vfs
|-- man
|   |-- man1
|   |   |-- findsmb.1
|   |   |-- ldbadd.1
|   |   |-- ldbdel.1
|   |   |-- ldbedit.1
|   |   |-- ldbmodify.1
|   |   |-- ldbrename.1
|   |   |-- ldbsearch.1
|   |   |-- log2pcap.1
|   |   |-- nmblookup.1
|   |   |-- ntlm_auth.1
|   |   |-- profiles.1
|   |   |-- rpcclient.1
|   |   |-- sharesec.1
|   |   |-- smbcacls.1
|   |   |-- smbclient.1
|   |   |-- smbcontrol.1
|   |   |-- smbcquotas.1
|   |   |-- smbget.1
|   |   |-- smbstatus.1
|   |   |-- smbtar.1
|   |   |-- smbtree.1
|   |   |-- testparm.1
|   |   |-- vfstest.1
|   |   `-- wbinfo.1
|   |-- man5
|   |   |-- lmhosts.5
|   |   |-- smb.conf.5
|   |   |-- smbgetrc.5
|   |   `-- smbpasswd.5
|   |-- man7
|   |   |-- libsmbclient.7
|   |   |-- samba.7
|   |   `-- winbind_krb5_locator.7
|   `-- man8
|       |-- cifs.upcall.8
|       |-- eventlogadm.8
|       |-- idmap_ad.8
|       |-- idmap_adex.8
|       |-- idmap_hash.8
|       |-- idmap_ldap.8
|       |-- idmap_nss.8
|       |-- idmap_rid.8
|       |-- idmap_tdb.8
|       |-- idmap_tdb2.8
|       |-- mount.cifs.8
|       |-- net.8
|       |-- nmbd.8
|       |-- pam_winbind.8
|       |-- pdbedit.8
|       |-- smbd.8
|       |-- smbpasswd.8
|       |-- smbspool.8
|       |-- swat.8
|       |-- tdbbackup.8
|       |-- tdbdump.8
|       |-- tdbtool.8
|       |-- umount.cifs.8
|       |-- vfs_acl_tdb.8
|       |-- vfs_acl_xattr.8
|       |-- vfs_audit.8
|       |-- vfs_cacheprime.8
|       |-- vfs_cap.8
|       |-- vfs_catia.8
|       |-- vfs_commit.8
|       |-- vfs_default_quota.8
|       |-- vfs_dirsort.8
|       |-- vfs_extd_audit.8
|       |-- vfs_fake_perms.8
|       |-- vfs_fileid.8
|       |-- vfs_full_audit.8
|       |-- vfs_gpfs.8
|       |-- vfs_netatalk.8
|       |-- vfs_notify_fam.8
|       |-- vfs_prealloc.8
|       |-- vfs_preopen.8
|       |-- vfs_readahead.8
|       |-- vfs_readonly.8
|       |-- vfs_recycle.8
|       |-- vfs_shadow_copy.8
|       |-- vfs_shadow_copy2.8
|       |-- vfs_smb_traffic_analyzer.8
|       |-- vfs_streams_depot.8
|       |-- vfs_streams_xattr.8
|       |-- vfs_xattr_tdb.8
|       `-- winbindd.8
|-- private
|   |-- passdb.tdb
|   `-- secrets.tdb
|-- share
|   `-- locale
|       `-- de
|           `-- LC_MESSAGES
|               `-- pam_winbind.mo
`-- var
    |-- cores [error opening dir]
    |-- locks
    |   |-- account_policy.tdb
    |   |-- brlock.tdb
    |   |-- browse.dat
    |   |-- connections.tdb
    |   |-- gencache.tdb
    |   |-- group_mapping.ldb
    |   |-- locking.tdb
    |   |-- messages.tdb
    |   |-- mutex.tdb
    |   |-- nmbd-smb.conf.pid
    |   |-- ntdrivers.tdb
    |   |-- ntforms.tdb
    |   |-- ntprinters.tdb
    |   |-- perfmon
    |   |-- printing
    |   |-- registry.tdb
    |   |-- sessionid.tdb
    |   |-- share_info.tdb
    |   |-- smbd-smb.conf.pid
    |   `-- unexpected.tdb
    |-- log.nmbd
    `-- log.smbd

편의를 위해 순서를 약간 변경했습니다.
Posted by 구차니