속시원한 대답은 아니지만

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 구차니
삼바를 하면서 고생한게 몇개 있는데..

첫째는 크로스 컴파일시에 --target 옵션 넣으면 안된다는 것과
둘째는 설치 경로를 못잡아서 헤맨 것이다.


일단 삼바가 제대로 설정되었는지 확인하기 위한 testparm툴을 삼바에서 제공한다.
이 녀석을 사용하면 무엇이 잘못되었는지 찾는데 도움이 될 것이다.
[링크 : http://forums.debian.net/viewtopic.php?f=5&t=42082]

나의 경우에는 무리하게 Makefile 을 수정해서 생긴문제였는데
testparm을 하면 아래와 같이 출력되었었다.
# testparm
Load smb config files from /etc/smb.conf
creating default valid table
Loaded services file OK.
ERROR: lock directory /home/morpheuz/st7109/target/var/locks does not exist
ERROR: state directory /home/morpheuz/st7109/target/var/locks does not exist
ERROR: cache directory /home/morpheuz/st7109/target/var/locks does not exist
ERROR: pid directory /home/morpheuz/st7109/target/var/locks does not exist
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
        netbios name = SMB TEST

Makefile에서
prefix를 /home/morpheuz/st7109/target 으로 했었는데. 이 경우에 컴파일 된 smbd에 저 경로를 이식하는 바람에
타켓 환경에서 엉뚱한 경로를 뒤적이게 되서 이러한 현상이 발생하게 되었다.

이를 해결하기 위해서는
아~~~무런 Makefile 수정없이 아래와 같이 입력하면 된다.

make DESTDIR=/home/morpheuz/st7109/target install

물론 Makefile 내에 DESTDIR이 있지만, 설정상의 문제인지 강제로 저값을 넣어주면
설치중에 엉뚱한 경로가 추가되어 설치에 실패하게 된다.
($(DESTDIR)%(LIBDIR) 사이에 이상하게도 /가 하나더 들어간다 결과적으로
/home/moprheuz/st7109/target//usr/local 경로가 되면서 설치 실패한다.)


아래의 링크는 autoconf의 DESTDIR 과 각종 디렉토리 변수에 대한 gnu 문서이다.
[링크 : http://www.gnu.org/software/autoconf/manual/standards/DESTDIR.html#DESTDIR]
[링크 : http://www.gnu.org/software/autoconf/manual/standards/Directory-Variables.html#Directory-Variables]
Posted by 구차니
$ smbd -d
$ ps -ef | grep smbd

를 했는데 출력되는 메시지가 없는건, smbd가 구동하는데 실패를 했다는 것이다.
이유야 찾아봐야 알겠지만, 에러메시지가 어디에 나오는지 알수가 없으니 막막하다

$ smbd --help
Usage: smbd [OPTION...]
  -D, --daemon                            Become a daemon (default)
  -i, --interactive                       Run interactive (not a daemon)
  -F, --foreground                        Run daemon in foreground (for
                                          daemontools, etc.)
  --no-process-group                      Don't create a new process group
  -S, --log-stdout                        Log to stdout
  -b, --build-options                     Print build options
  -p, --port=STRING                       Listen on the specified ports
  -P, --profiling-level=PROFILE_LEVEL     Set profiling level

Help options:
  -?, --help                              Show this help message
  --usage                                 Display brief usage message

Common samba options:
  -d, --debuglevel=DEBUGLEVEL             Set debug level
  -s, --configfile=CONFIGFILE             Use alternate configuration file
  -l, --log-basename=LOGFILEBASE          Base name for log files
  -V, --version                           Print version

Build-time configuration overrides:
  --sbindir=SBINDIR                       Path to sbin directory
  --bindir=BINDIR                         Path to bin directory
  --swatdir=SWATDIR                       Path to SWAT installation directory
  --lmhostsfile=LMHOSTSFILE               Path to lmhosts file
  --libdir=LIBDIR                         Path to shared library directory
  --modulesdir=MODULESDIR                 Path to shared modules directory
  --shlibext=SHLIBEXT                     Shared library extension
  --lockdir=LOCKDIR                       Path to lock file directory
  --statedir=STATEDIR                     Path to persistent state file
                                          directory
  --cachedir=CACHEDIR                     Path to temporary cache file
                                          directory
  --piddir=PIDDIR                         Path to PID file directory
  --smb-passwd-file=SMB_PASSWD_FILE       Path to smbpasswd file
  --private-dir=PRIVATE_DIR               Path to private data directory

일단 smbd -S 를 하면 stdout(= 모니터)로 출력이 되는데, 백그라운드 모드로는 구동하면 출력이 불가능하다고
아래와 같은 메시지를 출력한다.

 ERROR: Can't log to stdout (-S) unless daemon is in foreground (-F) or interactive (-i)

해달라는 대로 해주면된다.

$ smbd -S -F 혹은
$ smbd -S -i
Posted by 구차니
gnutls - GNU Tranport Layer Seucity Library
[링크 : http://www.gnu.org/software/gnutls/]

SWAT - Samba Web Administration Tool
[링크 : http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/SWAT.html]
웹으로 삼바를 설정하는 웹어플리케이션. 굳이 필요없다면 제외가능

CUPS - Common Unix Printing System
[링크 : http://en.wikipedia.org/wiki/CUPS]
삼바에서 프린터도 공유하는 이유로 CUPS 지원항목이 들어있는 것으로 추측된다.

FHS - Filesystem Hierarchy Standard
[링크 : http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard]
일반적인 리눅스에서 사용하는 RootFS의 구조 / /dev /etc /var 이런 구조를 지칭한다.

talloc - talloc is a hierarchical pool based memory allocator with destructors
[링크 : http://talloc.samba.org/]

winbind - winbind is a component of the Samba suite of programs that solves the unified logon problem. Winbind uses a UNIX implementation of Microsoft RPC calls, Pluggable Authentication Modules (PAMs), and the name service switch (NSS) to allow Windows NT domain users to appear and operate as UNIX users on a UNIX machine.
[링크 : http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/winbind.html]
이 녀석은 있으면 좋고 없으면 그만이다.

tdb - Trivial DB. The directory in which Samba stores the tdb files is determined by compile-time directives.
[링크 : http://www.linuxtopia.org/online_books/network_administration_guides/samba_reference_guide]
[링크 : http://tdb.samba.org/]
Posted by 구차니
FEATURE default 설명
debug no Turn on compiler debugging information
developer no Turn on developer warnings and debugging
krb5developer no Turn on developer warnings and debugging, except -Wstrict-prototypes
picky-developter - Halt compilation on warnings
largefile - omit support for large files
external-libtalloc auto Enable external talloc
socket-wrapper no Turn on socket wrapper library
nss-wrapper no Turn on nss wrapper library
swat yes Build the SWAT tool
dmalloc no Enable heap debugging
cups auto Turn on CUPS support
iprint yes if cups is yes Turn on iPrint support
static=PKGS no build static libraries default
shared=PKGS yes build shared libraries default
pie yes Turn on pie support if available
relro yes Turn on Relocations Read-Only (relro) support if available
fam auto Turn on FAM support
shared-libs yes Use shared libraries internally
dnssd no Enable DNS service discovery support
avahi auto Enable Avahi support
merged-build - Build Samba 4 as well
gnutls yes Turn on gnutls support

configure --help 에서 정리

Posted by 구차니
테스트용으로 notepad2의 소스로 한번 프로젝트를 구성해보았다.

Project - Add files recursively 를 클릭한다.
그러면 경로를 선택 후, 어떤 파일을 추가할지를 물어보는데, 귀찮으면 Select All을 누르고 OK

어떤 build에 속하게 할지 하는건데, 귀찮으니 일단 여기도 Select All 하고 OK

프로젝트가 생성되어 notepad2.c 파일을 열어 놓은 모습이다.
Source Insight 처럼 Ctrl-O로 모든 파일중에 비슷한 이름으로 검색하여 열어주는 기능이 없어서 조금 아쉽다.

개인적으로 마음에 드는 기능으로 화면분할기능이다(split) 간혹 동일 소스에서 여러군데를 수정해야 할때
왔다 갔다 하지 않고 보면서 할 수 있어서 편한 기능이다. (그래도 차라리 위치 네비게이션이 있는 낫다)

함수의 컨텍스트 메뉴이다. Find declatation 은 프로토타입, Find implementation은 함수의 위치를 추적하는 기능이다.

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

Code::Blocks  (0) 2009.09.14
Code::Blocks - C++ 에디터 for linux  (2) 2009.09.12
Posted by 구차니
Code::Blocks 는 아래의 About에서 보이듯, open source의 IDE 이다.
물론 KDE용으로 Kscope 등이 있지만, 윈도우용으로도 상용에 뒤지 않을 정도의 프로젝트를 지원하고
깔끔한 UI를 가진 녀석은 보기 힘들었는데, 이녀석은 컴파일러/디버거 까지 cygwin에서 끌어왔는지,
하나의 패키지로 구성을 해놓았다.

일단 메뉴 구성을 보니...
Scintilla 기반에 code folding 적용하고(Syntax highlight)
wxPython으로 만든게 아닐까라는 생각이 든다.(About의 wx2.8.7)


단점 :
그래도 아쉬운건.. Source Insight 급의 자동 추적 기능이 없다는점
- 이래서는 머.. Visual Studio에서 Prototype 따라다니는거나 다를바가 없다는 정도랄까..

Eclipse에서는 그래도 이전 위치로 오가는 기능이 있었는데,
아직 Code::Blocks에서는 발견하지 못했다.

장점 :
깔끔하게 gdb/gcc 를 윈도우 패키지로 묶어 놨다는 점
UI가 생각보다 깔끔하다는 점
cygwin이 아니라 윈도우 프로그램이라 구동도 빠르다는 점





아래는 설치중 컴파일러를 고르는 화면이다. minGW 패키지로 설치할경우 gcc가 설치되므로 기본으로 detect가 된다.


아래는 프로젝트를 생성하는 wizard이다. 일단 위찮으니 콘솔 프로그램으로 하고

"환영합니다" 정도는 무시하고 넘어가는 센스~ 다시 보고 싶지 않으면 체크해주고 넘어가는 센스!

사용될 언어를 고르라는데 기본값은 C++ 이었다.

프로젝트 이름과, 프로젝트 파일이 지정될 위치를 정해준다.
기본적으로 프로젝트 이름이 저장될 폴더 이름이 되므로, 적당하게 구분이 되도록 적어준다.

머.. 원래 아래 두개는 체크가 꺼져있는데 웬지 끄면 안될꺼 같아서 체크하고 스샷~!
Debug와 Release로 구분되어 있는데 마치 Visual Studio 같았다.

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

Code::Blocks C++ 프로젝트  (0) 2009.09.14
Code::Blocks - C++ 에디터 for linux  (2) 2009.09.12
Posted by 구차니
프로그램 사용/winscp2009. 9. 12. 22:29


winscp에서 한글 파일명을 복사하려고 하면 위와 같은 에러가 발생한다.

$ more i18n
LANG="ko_KR.UTF-8"
SYSFONT="lat0-sun16"

서버의 언어 설정은 위와 같지만.. UTF-8 관련 지정을 해주어도 여전히 파일은 복사되지 않았다..
winscp 프로젝트 팀에 항의를 해야 하나 -0-?

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

winscp 로 서로 다른 시스템으로 복사하기  (0) 2015.01.20
winscp sftp 접속불가 문제  (0) 2013.02.09
winscp - passive/active mode  (0) 2012.04.28
winscp UTF-8 한글 적용하기  (2) 2012.01.16
sftp 접속하기  (0) 2009.05.10
Posted by 구차니