미친감자~~

Buildroot라는 것에 대해서 설명해봐~


잘 모르겠는데요…

빌드루트?

그게 뭐죠?~~


미친감자…나는 평화주의자야..

예수님의 이름으로 용서할께

싸다구같은것은 안떄릴께..

얼릉 찾아봐..



예수님 감사합니다~~(저는 완전 예수쟁이입니다.)


그런데..에러가 납니다.



[root@localhost ~]# git clone git://git.buildroot.net/buildroot

Cloning into 'buildroot'...

remote: Counting objects: 188132, done.

remote: Compressing objects: 100% (59389/59389), done.

remote: Total 188132 (delta 129479), reused 186192 (delta 127847)

Receiving objects: 100% (188132/188132), 45.70 MiB | 327.00 KiB/s, done.

Resolving deltas: 100% (129479/129479), done.

Checking connectivity... done.

[root@localhost ~]# cd buildroot/

[root@localhost buildroot]# make menuconfig

.

.

.





[root@localhost buildroot]# make clean && make -j4


이렇게 했는데..말입니다.

미친감자님~~에러가 납니다.



make[1]: Leaving directory '/root/buildroot'

Your Perl installation is not complete enough; at least the following

modules are missing:


        Thread::Queue


support/dependencies/dependencies.mk:28: recipe for target 'core-dependencies' failed

make: *** [core-dependencies] Error 1



이렇게 했는데..말입니다.

펄 모듈중 Thread::Queue라는 모듈이 없는가 봅니다.


흐…


방법은

http://paguilar.org/?p=426 ← 이곳에서 찾았습니다.





$ cpan

cpan shell -- CPAN exploration and modules installation (v2.00)

Enter 'h' for help.


cpan[1]> install Thread/Queue.pm



이렇게 하랍니다.



자 해봅니다.

자 그래서 cpan 부터해서 Thread::Queue 까지 설치했습니다.



[root@localhost buildroot]# dnf install cpan

Last metadata expiration check performed 0:44:25 ago on Tue Dec  1 22:05:13 2015.

Dependencies resolved.

.

.

.



Complete!


cpan 설치하고...



[root@localhost buildroot]# cpan

Loading internal null logger. Install Log::Log4perl for logging messages


CPAN.pm requires configuration, but most of it can be done automatically.

If you answer 'no' below, you will enter an interactive dialog for each

configuration option instead.


Would you like to configure as much as possible automatically? [yes] y


Perl site library directory "/usr/local/share/perl5" does not exist.

Perl site library directory "/usr/local/share/perl5" created.

Perl site library directory "/usr/local/lib/perl5" does not exist.

Perl site library directory "/usr/local/lib/perl5" created.


Autoconfiguration complete.


commit: wrote '/root/.local/share/.cpan/CPAN/MyConfig.pm'


You can re-run configuration any time with 'o conf init' in the CPAN shell

Terminal does not support AddHistory.


cpan shell -- CPAN exploration and modules installation (v2.11)

Enter 'h' for help.


cpan[1]> install Thread/Queue.pm

Fetching with HTTP::Tiny:




음…

capn을 실행하고...

install Thread/Queue.pm 해주고..

다시 빌드!!!


그런데 빌드하는데 시간이 왜이리 오래 걸리죠?

10분은 넘은것 같은데

아직도…

계속 빌딩중인군요~~!!


성공여부는 담에…~~!!







자 이번에는

리눅스에서

하위 디렉토리에서 파일의 내용을 찾는 명령은?


grep -r "찾을 문자열" ./*


대소문자 구분하지 않기?


-i : 지정한 문자열에 대소문자 구분하지 않기




grep -ri "찾을 문자열" ./*


이렇게 하면 된다는것~~



Makefile…을 만들고….

이놈을 이용해서 빌드하자…



핵심요소는


obj-y +=


이놈이다…



obj-y


obj-y


obj-y


이놈이 핵심이다.


이 키워드가 있어야….


make가 …………

빌드를 한단다…


실험해보자~~!!!


실험 개시~~!!!


test.c 파일 만들고

#include <stdio.h>


void main()

{

printf("test^___^\n");

}




Makefile 파일 만들고~~!


obj-y += test.o



자…~~


make를 해보자~~!



[root@localhost test001]# make

make: *** 타겟 없음.  멈춤.



뭐시기~~~????

타겟이 없어???


타겟을 지정해줘야 하는겨??



그런데 ‘타겟’이 뭐지?


이건가?



test:

obj-y += test.o


자….

대충 해보는 거야~~

뭐~~


다시 make~~!!


[root@localhost test001]# make

cc     test.c   -o test

오~~오~~

에러 안났어~~~

에러 없어…~~~!!

맞았어…


내 예측이 맞았어~~!


천재 천재~~~~~~!!!


[root@localhost test001]# ls -la

합계 24

drwxr-xr-x.  2 root root 4096 11월 20 18:48 .

drwx------. 18 test test 4096 11월 20 18:30 ..

-rwxr--r--.  1 root root   22 11월 20 18:48 Makefile

-rwxr-xr-x.  1 root root 7336 11월 20 18:48 test

-rwxr--r--.  1 root root   61 11월 20 18:31 test.c




test라는 실행파일이 생겼습니다.

오 그런데...object파일은 왜 없지?

지웠나?;;;스스로 지웠나???

암튼…

실행해보자…



[root@localhost test001]# ./test

test^___^



오~~오~~

정확히 찍히네~~~



obj-m


으로 해볼까???



test:

obj-m += test.o


음..obj-m 으로 해도 make 잘되네~~!


[root@localhost test001]# make

cc     test.c   -o test

[root@localhost test001]# ls -la

합계 24

drwxr-xr-x.  2 root root 4096 11월 20 18:59 .

drwx------. 18 test test 4096 11월 20 18:30 ..

-rwxr--r--.  1 root root   22 11월 20 18:58 Makefile

-rwxr-xr-x.  1 root root 7336 11월 20 18:59 test

-rwxr--r--.  1 root root   68 11월 20 18:59 test.c

[root@localhost test001]# ./test

test^_____^




obj-m으로 해도 ...make 잘된 화면입니다.~~~

믿어주세요~~!


그런데…

드라이버 파일은…

타겟이 없는데 어떻게 make가 되는 거지?

왜? 에러가 없지?


자 보시라… 커널 속….Makefile 을~~



[root@localhost test001]# make

cc     test.c   -o test

[root@localhost test001]# ls -la

합계 24

drwxr-xr-x.  2 root root 4096 11월 20 18:59 .

drwx------. 18 test test 4096 11월 20 18:30 ..

-rwxr--r--.  1 root root   22 11월 20 18:58 Makefile

-rwxr-xr-x.  1 root root 7336 11월 20 18:59 test

-rwxr--r--.  1 root root   68 11월 20 18:59 test.c

[root@localhost test001]# ./test

test^_____^





자 이제


obj-n


으로 해보자~~


test:

obj-n += test.o

make가 될까?

obj-n


뭐야???

그냥 make되잖아~~!!!

뭐여????


[root@localhost test001]# make

cc     test.c   -o test

[root@localhost test001]# ls -la

합계 24

drwxr-xr-x.  2 root root 4096 11월 20 19:28 .

drwx------. 18 test test 4096 11월 20 18:30 ..

-rwxr--r--.  1 root root   22 11월 20 19:27 Makefile

-rwxr-xr-x.  1 root root 7336 11월 20 19:28 test

-rwxr--r--.  1 root root   71 11월 20 19:27 test.c

[root@localhost test001]# ./test

test^________^

실행도 아주 잘됩니다~~~



obj-X

X의 의미는 뭐야???


아니 이런….

굳이….

obj-n


obj-y obj-m objn 같은것은

필요엢네요…


왜냐고요???

이렇게 하고 실험했으니까요…

Makefile을 이렇게 했어요

test:


타겟만 적고..어떤 파일을 빌드하라고 하는 말은 안한거죠~~!


그랬더니…


[root@localhost test001]# make

cc     test.c   -o test

[root@localhost test001]# ./test

test^_____________^



빌드 아주 잘됩니다.

아니 이런…

아니 이런….

Makefile 무식자여~~~


당신은 이제까지 뭘했단 말인가????

무식자~~~


그냥 타겟만 있으면 되는거네~~


음..그렇다면 타겟이 있으면..

현재디렉토리의 모든 소스 파일을 알아서 컴파일 해주는 것인가?

확인해보자…


  1. 새로운 c소스 파일을 만든다.

  2. 그리고...make 해본다…



[root@localhost test001]# ls -la

합계 28

drwxr-xr-x.  2 root root 4096 11월 20 19:40 .

drwx------. 18 test test 4096 11월 20 18:30 ..

-rwxr--r--.  1 root root    7 11월 20 19:35 Makefile

-rwxr-xr-x.  1 root root 7336 11월 20 19:36 test

-rwxr--r--.  1 root root   85 11월 20 19:41 test.c

-rwxr--r--.  1 root root   75 11월 20 19:40 test001.c

[root@localhost test001]# make

cc     test.c   -o test

[root@localhost test001]# cat test001.c

#include <stdio.h>


test()

{

       printf("I am test001.c's function~!");

}

[root@localhost test001]# make

make: 'test' is up to date.

[root@localhost test001]# touch test.c

[root@localhost test001]# make

cc     test.c   -o test

[root@localhost test001]# ^C




음...아니라는 점~~

뭐가 아닌가????

디렉토리의 모든 소스파일을 알아서 절대~~

절대~~

컴파일 해주지 않는다는점~~~~!!!

뭐냐???


위에서 보시면 아시겠지만…

test.c만 컴파일 했다는 점..~~

test001.c 는 그냥 무시했다는 점~~~~;;;;;

뭐지???


그럼… test001 이라는 타겟을 만들면 되나??


자..test001: 타겟 집어 넣었어~~

자~~


[root@localhost test001]# make

make: 'test' is up to date.

[root@localhost test001]# touch test.c

[root@localhost test001]# touch test001.c

[root@localhost test001]# make

cc     test.c   -o test




해도 소용 없다는 점~~;;;;;

여전히 test.c만 컴파일 한다는 점???

뭐야???

도대체


뭐야???

모르겠다…

컴파일의 기준을…

그러면…

test: 라는 라벨을 없애버리겠어~~!


음…

test001:만 남기니…

음…

test001.c 만 컴파일 하는군요…

즉 처음 나온타켓의 소스만 찾아서 컴파일하는 결론이 나오는 군요~~;;



[root@localhost test001]# touch test.c

[root@localhost test001]# touch test001.c

[root@localhost test001]# make

cc     test001.c   -o test001

test001.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int]

test()

^

/usr/lib/gcc/i686-redhat-linux/5.1.1/../../../crt1.o: In function `_start':

(.text+0x18): undefined reference to `main'

collect2: error: ld returned 1 exit status

<builtin>: recipe for target 'test001' failed

make: *** [test001] Error 1

보이시죠~~^_^(일단 에러는 무시해주세요~~지금은 make는 누구를 컴파일 하는냐 테스트니~~)

타켓이 test001이니

test001.c 만 컴파일 했습니다.

그리고, main()함수가 test001.c에는 없느니..에러를 뱉어내십니다.




[참고해야할 곳~~]

http://developinghappiness.com/?page_id=222

http://developinghappiness.com/?page_id=222

















부팅하면서~~

sshd를 시작하는 방법~~~


test@localhost ~]$ systemctl enable sshd.service

Created symlink from /etc/systemd/system/multi-user.target.wants/sshd.service to /usr/lib/systemd/system/sshd.service.


저의 리눅스 배포판은

패도라 입니다.




내가 실행했던 명령을 확인해보자….

그리고, 그놈중에 실행을 해보자..


history라는 명령이 있다.



history




history라고 입력하면…

이제까지 입력했던 명령들이 표시되고요~!

[root@localhost test]# history

   1  vi /boot/grub2/grub.cfg

   2  ls

   3  cd /usr

   4  cd lib

   5  cd ..

   6  ls

   7  cd src

   8  ls

   9  cd linux/

  10  ls

  11  make mrproper

  12  cp /usr/src/kernels/4.2.5-300.fc23.i686/.config

  13  cp /usr/src/kernels/4.2.5-300.fc23.i686/.config .

  14  make

  15  ls -lh /usr/src/linux/arch/x86/boot/bzImage

  16  cd /boot

  17  ls

  18  ls -la

  19  cd /usr/src/kernels/4.2.5-300.fc23.i686/

  20  ls -la

  21  cd /usr




이중에 다시 실행하고 싶은게 있으면~

! 을 사용하시면 됩니다.


다음 처럼~~

!2

를 입력하면~

2번째 히스토리를 실행하라는 것~~!

[root@localhost test]# !2

ls

공개  다운로드  문서  바탕화면  비디오  사진  서식  음악



느낌표가..핵심…~~!!


!번호


이렇게 하면 히스토리 명령을 실행할 수 있다는점~~!!



일단 삼바 설치!!

쌈바?

삼바?

쌈바야? 삼바야?

삼다든

쌈바든…

브라질 축제를 이야기 하고 있네요…

그럼


리눅스 삼바도 이건가?


이게 리눅스 삼바….

이렇게 순진한것인데…


브라질 삼바축제는 영어로 뭐지?

맞는것 같은데~~

쌈바 축제도…

Samba네~~~~~

;;;;;

뭐지 더 알아봐야겠다.


암튼...지금 samba를 설정해볼려고 해요…


이것~~~

쌈바축제의 쌈바알니라는것~~~~!!




[root@localhost linux]# dnf install samba                                       

Yum command has been deprecated, redirecting to '/usr/bin/dnf install samba'.   

See 'man dnf' and 'man yum2dnf' for more information.                           

To transfer transaction metadata from yum to DNF, run:                          

'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'                

                                                                               

Last metadata expiration check performed 2:08:01 ago on Fri Nov 20 12:22:16 2015

Dependencies resolved.                                                          

================================================================================

Package                               Arch                      Version        

================================================================================

Installing:                                                                     

python                                i686                      2.7.10-8.fc23  

python-libs                           i686                      2.7.10-8.fc23  

python-pip                            noarch                    7.1.0-1.fc23   

python-setuptools                     noarch                    18.0.1-2.fc23  

python-talloc                         i686                      2.1.3-1.fc23   

samba                                 i686                      2:4.3.0-3.fc23

samba-common-tools                    i686                      2:4.3.0-3.fc23

samba-libs                            i686                      2:4.3.0-3.fc23

                                                                               

Transaction Summary                                                             

================================================================================

Install  8 Packages                                                             

                                                                               

Total download size: 9.2 M                                                      

Installed size: 35 M                                                            

Is this ok [y/N]: y                                                             

Downloading Packages:                                                           

(1/8): samba-libs-4.3.0-3.fc23.i686.rpm                                         

(2/8): samba-common-tools-4.3.0-3.fc23.i686.rpm                                 

(3/8): samba-4.3.0-3.fc23.i686.rpm                                              

(4/8): python-talloc-2.1.3-1.fc23.i686.rpm                                      

(5/8): python-2.7.10-8.fc23.i686.rpm                                            

(6/8): python-setuptools-18.0.1-2.fc23.noarch.rpm                               

(7/8): python-pip-7.1.0-1.fc23.noarch.rpm                                       

(8/8): python-libs-2.7.10-8.fc23.i686.rpm                                       

--------------------------------------------------------------------------------

Total                                                                           

Running transaction check                                                       

Transaction check succeeded.                                                    

Running transaction test                                                        

Transaction test succeeded.                                                     

Running transaction                                                             

 Installing  : python-libs-2.7.10-8.fc23.i686                              1/8

 Installing  : python-pip-7.1.0-1.fc23.noarch                              2/8

 Installing  : python-setuptools-18.0.1-2.fc23.noarch                      3/8

 Installing  : python-2.7.10-8.fc23.i686                                   4/8

 Installing  : python-talloc-2.1.3-1.fc23.i686                             5/8

 Installing  : samba-libs-2:4.3.0-3.fc23.i686                              6/8

 Installing  : samba-common-tools-2:4.3.0-3.fc23.i686                      7/8

 Installing  : samba-2:4.3.0-3.fc23.i686                                   8/8

 Verifying   : samba-2:4.3.0-3.fc23.i686                                       

 Verifying   : samba-common-tools-2:4.3.0-3.fc23.i686                          

 Verifying   : samba-libs-2:4.3.0-3.fc23.i686                                  

 Verifying   : python-libs-2.7.10-8.fc23.i686                                  

 Verifying   : python-talloc-2.1.3-1.fc23.i686                                 

 Verifying   : python-2.7.10-8.fc23.i686                                       

 Verifying   : python-pip-7.1.0-1.fc23.noarch                                  

 Verifying   : python-setuptools-18.0.1-2.fc23.noarch                          

                                                                               

Installed:                                                                      

 python.i686 2.7.10-8.fc23                  python-libs.i686 2.7.10-8.fc23     

 python-setuptools.noarch 18.0.1-2.fc23     python-talloc.i686 2.1.3-1.fc23    

 samba-common-tools.i686 2:4.3.0-3.fc23     samba-libs.i686 2:4.3.0-3.fc23     

                                                                               




그리고,

system-config-samba

을 설치하라고 한다.

dnf install system-config-samba


[root@localhost linux]# dnf install system-config-samba

Last metadata expiration check performed 2:11:26 ago on Fri Nov 20 12:22:16 2015.

Dependencies resolved.

===================================================================================

Package                           Arch                 Version                        Repository             Size

===================================================================================

Installing:

dbus-python                       i686                 1.2.0-12.fc23                  updates               128 k

libglade2                         i686                 2.6.4-13.fc23                  fedora                 68 k

libselinux-python                 i686                 2.4-4.fc23                     fedora                294 k

pycairo                           i686                 1.10.0-2.fc23                  fedora                515 k

pygobject2                        i686                 2.28.6-14.fc23                 fedora                225 k

pygtk2                            i686                 2.24.0-12.fc23                 fedora                878 k

pygtk2-libglade                   i686                 2.24.0-12.fc23                 fedora                 30 k

python-decorator                  noarch               3.4.2-2.fc23                   fedora                 20 k

python-six                        noarch               1.9.0-3.fc23                   fedora                 34 k

python-slip                       noarch               0.6.4-1.fc23                   fedora                 36 k

python-slip-dbus                  noarch               0.6.4-1.fc23                   fedora                 36 k

python-xpyb                       i686                 1.3.1-5.fc23                   fedora                138 k

system-config-samba               noarch               1.2.100-4.fc23                 fedora                286 k


Transaction Summary

===================================================================================================================

Install  13 Packages


Total download size: 2.6 M

Installed size: 9.6 M

Is this ok [y/N]: y

Downloading Packages:

(1/13): pygtk2-libglade-2.24.0-12.fc23.i686.rpm                                    290 kB/s |  30 kB     00:00

(2/13): python-slip-0.6.4-1.fc23.noarch.rpm                                        723 kB/s |  36 kB     00:00

(3/13): python-slip-dbus-0.6.4-1.fc23.noarch.rpm                                   1.4 MB/s |  36 kB     00:00

(4/13): system-config-samba-1.2.100-4.fc23.noarch.rpm                              1.2 MB/s | 286 kB     00:00

(5/13): pygobject2-2.28.6-14.fc23.i686.rpm                                         1.2 MB/s | 225 kB     00:00

(6/13): pycairo-1.10.0-2.fc23.i686.rpm                                             1.8 MB/s | 515 kB     00:00

(7/13): pygtk2-2.24.0-12.fc23.i686.rpm                                             1.4 MB/s | 878 kB     00:00

(8/13): libglade2-2.6.4-13.fc23.i686.rpm                                           371 kB/s |  68 kB     00:00

(9/13): python-six-1.9.0-3.fc23.noarch.rpm                                         946 kB/s |  34 kB     00:00

(10/13): python-decorator-3.4.2-2.fc23.noarch.rpm                                  487 kB/s |  20 kB     00:00

(11/13): libselinux-python-2.4-4.fc23.i686.rpm                                     1.3 MB/s | 294 kB     00:00

(12/13): python-xpyb-1.3.1-5.fc23.i686.rpm                                         1.6 MB/s | 138 kB     00:00

(13/13): dbus-python-1.2.0-12.fc23.i686.rpm                                        560 kB/s | 128 kB     00:00

-------------------------------------------------------------------------------------------------------------------

Total                                                                              429 kB/s | 2.6 MB     00:06

Running transaction check

Transaction check succeeded.

Running transaction test

Transaction test succeeded.

Running transaction

 Installing  : python-six-1.9.0-3.fc23.noarch                                                                1/13

 Installing  : python-decorator-3.4.2-2.fc23.noarch                                                          2/13

 Installing  : dbus-python-1.2.0-12.fc23.i686                                                                3/13

 Installing  : python-xpyb-1.3.1-5.fc23.i686                                                                 4/13

 Installing  : pycairo-1.10.0-2.fc23.i686                                                                    5/13

 Installing  : libselinux-python-2.4-4.fc23.i686                                                             6/13

 Installing  : python-slip-0.6.4-1.fc23.noarch                                                               7/13

 Installing  : python-slip-dbus-0.6.4-1.fc23.noarch                                                          8/13

 Installing  : libglade2-2.6.4-13.fc23.i686                                                                  9/13

 Installing  : pygobject2-2.28.6-14.fc23.i686                                                               10/13

 Installing  : pygtk2-2.24.0-12.fc23.i686                                                                   11/13

 Installing  : pygtk2-libglade-2.24.0-12.fc23.i686                                                          12/13

 Installing  : system-config-samba-1.2.100-4.fc23.noarch                                                    13/13

 Verifying   : system-config-samba-1.2.100-4.fc23.noarch                                                     1/13

 Verifying   : pygtk2-2.24.0-12.fc23.i686                                                                    2/13

 Verifying   : pygtk2-libglade-2.24.0-12.fc23.i686                                                           3/13

 Verifying   : python-slip-0.6.4-1.fc23.noarch                                                               4/13

 Verifying   : python-slip-dbus-0.6.4-1.fc23.noarch                                                          5/13

 Verifying   : pycairo-1.10.0-2.fc23.i686                                                                    6/13

 Verifying   : pygobject2-2.28.6-14.fc23.i686                                                                7/13

 Verifying   : libglade2-2.6.4-13.fc23.i686                                                                  8/13

 Verifying   : libselinux-python-2.4-4.fc23.i686                                                             9/13

 Verifying   : python-six-1.9.0-3.fc23.noarch                                                               10/13

 Verifying   : python-decorator-3.4.2-2.fc23.noarch                                                         11/13

 Verifying   : python-xpyb-1.3.1-5.fc23.i686                                                                12/13

 Verifying   : dbus-python-1.2.0-12.fc23.i686                                                               13/13


Installed:

 dbus-python.i686 1.2.0-12.fc23            libglade2.i686 2.6.4-13.fc23         libselinux-python.i686 2.4-4.fc23

 pycairo.i686 1.10.0-2.fc23                pygobject2.i686 2.28.6-14.fc23       pygtk2.i686 2.24.0-12.fc23

 pygtk2-libglade.i686 2.24.0-12.fc23       python-decorator.noarch 3.4.2-2.fc23 python-six.noarch 1.9.0-3.fc23

 python-slip.noarch 0.6.4-1.fc23           python-slip-dbus.noarch 0.6.4-1.fc23 python-xpyb.i686 1.3.1-5.fc23

 system-config-samba.noarch 1.2.100-4.fc23


Complete!





http://ddonyo.egloos.com/3936234

의 요점은..

/etc/samba/smb.conf

에 공유하고 싶은

디렉토리를 설정해주라는 것!!!

그리고, 사용자도 추가해주라는 것!!!


/etc/samba/smb.conf 파일에...다음과

같은 내용을 적어주면 된다...

[share]

       comment = user

       path = /home/test/share

       read only = no

       valid users = root

       browseable = no

       create mask = 0765

중요한것은

pathvalid users

path는 공유하고 싶은 디렉토리이름

valid users는 사용을 허락하는 사용자~~

그리고 나머지는 그대로 타이핑 하시라~~~


아 그리고,

삼바에서는 계정을 따로 관리하는 것 같습니다.

그래서, 삼바사용자의 패스워드를 따로 다음과 같이

입력해줘야 한담니다.

적어주면 된다...

[root@localhost]#smbpasswd -a root

New SMB password:

Retype new SMB password:


중요한것은

root는 위에서 valid usrs에 추가했던

사용자 id입니다...

그리고 패스워드를 입력해주면 끝???!!!

아니요,네트워크 방화벽에 UDP 137/138, TCP 139/445포트의

ACCEPT를 허용해줘야죠~~

안그러면..네트워크 방화벽이..

접속을 차단해버립니다.~~~

아니면, 네트워크방화벽(iptables)를 꺼버리던지요^^ㅎㅎㅎ

그런데 어떻게 끄는지를 모르겠네요;;;;

암튼네트워크 방화벽...이놈을 무시하면 안된다는것~~~!!


자...이제 다 되었냐?

아니죠...

SAMBA와 IPTABLES를 재시작해야죠...


그런데 SAMBA의 서비스명은 SMB라는점~~

SAMBA아니라는 점~~~

아주 중요합니다.(저는 실수했습니당;;;)



#sudo service iptables restart

#sudo service smb restart

이렇게 하면 이제 될까요???

과연 잘 접속할까요?


밑의 글을 보시랑~~~ㅋㅋㅋ;;;;;;흫흐흐흐흐




음..인터넷에 하라고 하는대로 했는데…

안된다…;;;;;;;;;;;


뭐냐고….


뭐가 문제냐고…


여기까지는 나오는데...

음….

안들어가진다…


이 에러가 발생한다…


액세스 할 수 없습니다


라고 아주 친절하게 말씀해주신다….


권한이 없다고?


이런…


뭐냐???


내가 뭘 잘못했을까?


다시 확인해보자..





음…

이렇게 했어…



다시 해보자…

지우고…

지금까지 설정되어 있는 공유폴더 말이다.



오케 계정 물어보고…



여기까지 나오는데…

또..이런다..


왜 권한이 없다는 거지?



검색해보자…


이런

페도라 너가 문제였구나!!!!




https://kldp.org/node/74694 ← 이곳에서 답을 찾았다.

범인은 SELinux!!!




[root@localhost kernel]# chcon -t samba_share_t /kernel/linux-4.2.5

[root@localhost kernel]# /usr/sbin/semanage fcontext -a -t samba_share_t "/dir/to/share(/.*)?"





흐~~~

SELinux……때문에…

안되었군요….




[교훈]


  • 페도라면.. SELinux에 공유하고 싶은 폴더에 라벨(samba_share_t)을 추가하라!!

  • 그리고, 인터넷 메뉴얼 대로 해라~~!!!

    • 공유폴더 설정하고,

    • Iptables[방화벽]도 신경잘쓰고…네트워크 방화벽에 의해 차단될 수 있당!!!




아니 이런….

하위 폴더에 접근할려고 했더니…

접근이 안된다.


이런 뭐냐?

하위 디렉토리에도

라벨을 추가해야 하는가 보다…


다음 명령을...하위 모든 경로에도 적용되어야 할 것 같은데...

[root@localhost kernel]# chcon -t samba_share_t /kernel/linux-4.2.5



구글링해보자…


음...해결했습니당~~!

semanage 명령으로 하위경로와 파일까지

라벨을 추가할 수 있군요…~!!

#semanage fcontext -a -t samba_share_t "/kernel/linux-4.2.5(/.*)?"

#restorecon -Rv /kernel/linux-4.2.5

그리고~~ restorecon 명령을 해야..

적용된다는점~~!


자 확인하시죠~~~samba 라벨이 적용된 것을~~~!!

[root@localhost test001]# ls -aZ /kernel/linux-4.2.5

unconfined_u:object_r:samba_share_t:s0 .                                 unconfined_u:object_r:samba_share_t:s0 block

   unconfined_u:object_r:default_t:s0 ..                                unconfined_u:object_r:samba_share_t:s0 crypto

unconfined_u:object_r:samba_share_t:s0 .config                           

.. ..



역쉬~~~!!!


이제 잘 들어가집니다.~~~!








nosstarter.npe 넌 누구냐?


걱정하시지 않아도 됩니다…

악성코드 아닙니다!!


보이시죠~~

보안회사 모듈입니당~~!

그런데 왜?

죽었죠?

그건 모르겠습니다. ^^;;;;


음….

바이러스토탈에서도

안심하라고 하네요~~!!


https://www.virustotal.com/ko/file/26E674A857D7FDD3AA592AB0A7195E3DCBE812FA7C0E5EF80ADDECC4F4382609/analysis/


삭제 방법은 --> http://blog.naver.com/cjb3216/220504763707 



make -c


make의 -C 옵션은 무엇인가?



[root@localhost 4.2.5]# make --help

사용법: make [옵션] [타겟] ...

옵션:

 -b, -m                      Ignored for compatibility.

 -B, --always-make           Unconditionally make all targets.

 -C DIRECTORY, --directory=DIRECTORY

                             Change to DIRECTORY before doing anything.

 -d                          Print lots of debugging information.






Change to DIRECTORY before doing~~

doing 하기전에…디렉토리를 바꿔라~~~!!!

디렉토리 바꾸는 명령이였군요…………….

현재 디렉토리겠죠~~~~


무한 루프~~~~


그런데….경로를 바꾸고 그럴까요?


경로를 바꾸지 않으면...컴파일이 안되는 걸까요?

아니면….그곳...바꾼 Directory에 있는 소스를 가지고 메이크하라는 것일까요?



+ Recent posts