# useradd [-s /sbin/nologin] linuxuser < -- 삼바 계정 만들기
# smbpasswd -a linuxuser < -- 삼바 암호 만들기
# smbpasswd -n linuxuser <-- 비밀번호 설정하지 않음
# smbpasswd -x linuxuser <-- 삼바유저 삭제하기
<1> linux 서버 (LA5)
# rpm -qa | grep samba
#mount /dev/hdc /cdrom
# yum -y install samba
# mkdir /share => 공유할 디렉터리 만들기
# chmod 707 /share/
# vi /etc/samba/smb.conf
[share]
path = /share [ 공유할 폴더의 절대경로]
public = yes
writable = yes
browseable = yes
# service smb restart
# testparm /etc/samba/smb.conf
# useradd [-s /sbin/nologin] user1
# smbpasswd -a user1
# useradd [-s /sbin/nologin] user2
# smbpasswd -a user12
# useradd [-s /sbin/nologin] user2
# smbpasswd -a user2
# smbstatus <2> 윈도우 클라이언트 (WB2003) . \\192.168.10.2
. 전체네트워크 -> 워크그룹 -> 삼바공유 -> printer 공유 와 폴더 공유 보임
. http://localhost:631
. net use * /delete (★) => 로그인 내역 지우기
[share1] user3은 공유폴더 접근 및 읽고, 쓰기 가능한가?
comment = share1
browseable = no
path = /share1
writable = yes
read list = user1
=> user1이외의 유저에서는 파일을 읽을 수 없습니다.
[share2] user3은 공유폴더에 쓰기 불가능한가?
comment = share2
browseable = no
path = /share2
writable = no
write list = user2 유저ID 유저ID ...
만약 share2에 user2가 아닌 유저로 접근하였을때,[저는 user1으로 접근함] 접근하여 보는것은 가능하지만 새파일을 만드는것은 아래와 같이 거부당합니다.
[share3] user3은 공유폴더에 접근 불가능 한가?
comment = share3
browseable = no
path = /share3
writable = no
valid users = user1 user3
\\192.168.20.1\share3 에 실행창에서 접속하면 위으 로그인이 뜹니다. 만약에 내가 허용해주지 않은 user2로 로그인시 접근이 거부되어집니다.
'Server > Linux Server' 카테고리의 다른 글
[Linux Server] FTP server (0) | 2023.04.06 |
---|---|
[Linux Server] NFS 서버 실습 (0) | 2023.03.23 |
[Linux Server] NFS Server (0) | 2023.03.23 |
댓글