close
  • 홈
  • :
  • 위치로그
  • :
  • 태그
  • :
  • 방명록
  • :
  • 관리자
  • :
  • 새글쓰기
블로그 이미지

이슬나라 [isulnara.com]
전체 (159)
자작 프로그램 (20)
WebFTP (2)
iSysInfoX (2)
IEPageSetup (2)
EzIP (3)
ezSVC (1)
iDebugX (1)
msnAlert (2)
기타 (6)
버그 신고 (1)
이것저것.. (53)
WebFTP 게시판 (0)
팁 모음 (64)
linux (16)
프로그래밍 (30)
윈도우 (5)
네크워크 (7)
기타 (5)
Reverse Engineering (0)
윈도우 숨은 기능.. (4)
터미널 서비스 접속 (1)
공개 웹하드 (1)
PC 원격제어 요청 (1)
NAS (13)
Synology DS시리즈에서 b...
DS209+II bootstrap 설치...
TMS TDBAdvGrid componen...
태터툴즈, 텍스트큐브용...
msnAlert - MSN 알림이.
죄송합니다만 급한 일이...
isul / 07/02
이슬님, 지적해주신 대로...
오요섭 / 07/02
오옷~ 분석까지 해주시다...
오요섭 / 07/01
print_page.html 제가...
isul / 06/30
관리자만 볼 수 있는 댓...
/ 06/30
SSH ezSVC ftpls ftplist ftpdir brute-force attack 다운로드스테이션 scp 암호 자동입력 location.replace 유니콘 웹디스크 Pixels MAC Address 아이피설정 IEPageSetup 태터툴즈 디버깅 REFERENCE_TIME CPUID 날짜비교 DDNS FON 블록 Points TMS TDBAdvGrid 부팅 이미지 Prototype rsync putty sshd WebFTP
일반 어플리케이션을 서...
ㅇㅇ/ / 03/17
사이코웨어 : nProtect,...
√ MIRiyA's AstraLog / 2008
웹페이지에서 인쇄시 머...
醉生夢死™ / 2006
웹페이지에서 MAC Addres...
날자~!! 날어~!! / 2005
 최근글 목록
 2009/06 [2]
 2009/05 [5]
 2009/03 [4]
 2009/02 [3]
 2009/01 [2]
넷하드
바이러스제로
솔라리스 테크넷
스티브 맥코넬
파워해커
하얀나무's Story
전진하는 아르고
Total of
238485 visitors
Today 269
Yesterday 262
 
     
 NAS 
Synology DS시리즈에서 bash shell 사용
Posted on 2009/06/27 15:37
 
 
 
 
history 기능과 쉘 프롬프트에 현재 경로 표시하기 위한 용도 등으로 bash가 필요해서 설정해보았습니다.

먼저 bootstrap을 설치되어 있어야 합니다.
DS209+II의 경우 아래 팁을 참고하여 설치하면 됩니다.
http://isulnara.com/tt/201

1. bash 쉘 설치
ds> ipkg update
ds> ipkg install bash

2. /etc/passwd 수정  - 원하는 계정의 쉘을 변경
root:x:0:0:root:/root:/opt/bin/bash

3. 설정 파일 링크
ds> ln -s /opt/etc/profile /root/.bash_profile
ds> ln -s /opt/etc/profile /root/.bashrc

4. /opt/etc/profile 수정 - 필요에 따라 적당히 수정
#
# Bash initialization script
#

PS1='[\u@\h:\w]# '
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/bin:/usr/syno/sbin:
/opt/sbin:/opt/bin
LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}

export PS1 PATH LD_LIBRARY_PATH

MANPATH=/opt/man:${MANPATH}

if [ `/usr/bin/id -u` -eq 0 ]; then
HOME=/root
else
HOME=/volume1/`/usr/bin/id -n -u`
fi

EDITOR=vim
PAGER=less
TERM=linux
TERMINFO=/opt/lib/terminfo
MANPAGER='less -isrR'
RSYNC_RSH=ssh

export PATH OUTPUT_CHARSET MANPATH HOME EDITOR PAGER TERM MANPAGER RSYNC_RSH TERMINFO

alias ll='ls -la --color=auto'

이제 해당 계정으로 로그인하면 bash 쉘이 사용됩니다.
[root@ds:~]# ll
total 28
drwxr-xr-x  3 root root 4096 Jun 27 15:03 .
drwxr-xr-x 20 root root 4096 Jun 27 13:48 ..
-rw-------  1 root root 1109 Jun 27 15:38 .bash_history
lrwxrwxrwx  1 root root   16 Jun 27 15:03 .bash_profile -> /opt/etc/profile
lrwxrwxrwx  1 root root   16 Jun 27 15:03 .bashrc -> /opt/etc/profile
drwxr-xr-x  2 root root 4096 Jun 24 19:44 .ncftp
-rw-r--r--  1 root root  505 Jun 24 19:50 .profile
-rw-------  1 root root   67 Jun 23 20:21 nohup.out
-rwxr-xr-x  1 root root  105 Jun 23 09:53 wol.sh
[root@ds:~]# cd /usr/local/
[root@ds:/usr/local]#

발췌: http://oinkzwurgl.org/diskstation_hacks

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
이올린에 북마크하기(0) 이올린에 추천하기(0)
bash이올린 태그검색, DS209+II이올린 태그검색, synology이올린 태그검색
Trackback [0] : Comment [0]
TrackbackAddress
http://isulnara.com/tt/trackback/202
SecretComment
  1 2 3 4 5 ... 159