Samba
Sambaのインストール
[imadahirosi@yellow ~]$ sudo yum install samba Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package samba.x86_64 0:3.5.4-68.el6_0.2 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================================== Package Arch Version Repository Size ============================================================================================== Installing: samba x86_64 3.5.4-68.el6_0.2 sl-security 5.0 M Transaction Summary ============================================================================================== Install 1 Package(s) Upgrade 0 Package(s) Total download size: 5.0 M Installed size: 17 M Is this ok [y/N]: y Downloading Packages: samba-3.5.4-68.el6_0.2.x86_64.rpm | 5.0 MB 00:04 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : samba-3.5.4-68.el6_0.2.x86_64 1/1 Installed: samba.x86_64 0:3.5.4-68.el6_0.2 Complete!
ユーザーの登録
[imadahirosi@yellow ~]$ sudo pdbedit -a -u imadahirosi new password: retype new password: tdbsam_open: Converting version 0.0 database to version 4.0. tdbsam_convert_backup: updated /var/lib/samba/private/passdb.tdb file. account_policy_get: tdb_fetch_uint32 failed for type 1 (min password length), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 2 (password history), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 3 (user must logon to change password), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 4 (maximum password age), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 5 (minimum password age), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 6 (lockout duration), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 7 (reset count minutes), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 8 (bad lockout attempt), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 9 (disconnect time), returning 0 account_policy_get: tdb_fetch_uint32 failed for type 10 (refuse machine password change), returning 0 Unix username: imadahirosi NT username: Account Flags: [U ] User SID: S-1-5-21-970968779-120078618-1862418121-1000 Primary Group SID: S-1-5-21-970968779-120078618-1862418121-513 Full Name: Home Directory: \\yellow\imadahirosi HomeDir Drive: Logon Script: Profile Path: \\yellow\imadahirosi\profile Domain: YELLOW Account desc: Workstations: Munged dial: Logon time: 0 Logoff time: 9223372036854775807 seconds since the Epoch Kickoff time: 9223372036854775807 seconds since the Epoch Password last set: 水, 11 5月 2011 11:02:06 JST Password can change: 水, 11 5月 2011 11:02:06 JST Password must change: never Last bad password : 0 Bad password count : 0 Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
ユーザーの削除
[imadahirosi@yellow ~]$ sudo pdbedit -x -u imadahirosi [sudo] password for imadahirosi:
サービスの起動・終了・再起動
[imadahirosi@yellow ~]$ sudo /etc/rc.d/init.d/smb start SMB サービスを起動中: [ OK ] [imadahirosi@yellow ~]$ sudo /etc/rc.d/init.d/smb stop SMB サービスを停止中: [ OK ] [imadahirosi@yellow ~]$ sudo /etc/rc.d/init.d/smb start SMB サービスを起動中: [ OK ] [imadahirosi@yellow ~]$ sudo /etc/rc.d/init.d/smb restart SMB サービスを停止中: [ OK ] SMB サービスを起動中: [ OK ]
サービスの登録
[imadahirosi@yellow ~]$ sudo chkconfig smb on [imadahirosi@yellow ~]$ chkconfig acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off cgconfig 0:off 1:off 2:off 3:off 4:off 5:off 6:off cgred 0:off 1:off 2:off 3:off 4:off 5:off 6:off cpuspeed 0:off 1:on 2:on 3:on 4:on 5:on 6:off crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off cups 0:off 1:off 2:on 3:on 4:on 5:on 6:off haldaemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off ip6tables 0:off 1:off 2:on 3:on 4:on 5:on 6:off ipsec 0:off 1:off 2:off 3:off 4:off 5:off 6:off iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off irqbalance 0:off 1:off 2:off 3:on 4:on 5:on 6:off kdump 0:off 1:off 2:off 3:on 4:on 5:on 6:off lvm2-monitor 0:off 1:on 2:on 3:on 4:on 5:on 6:off mdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off messagebus 0:off 1:off 2:on 3:on 4:on 5:on 6:off microcode_ctl 0:off 1:off 2:on 3:on 4:on 5:on 6:off netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off network 0:off 1:off 2:on 3:on 4:on 5:on 6:off nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off nmb 0:off 1:off 2:off 3:off 4:off 5:off 6:off portreserve 0:off 1:off 2:on 3:on 4:on 5:on 6:off postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off psacct 0:off 1:off 2:off 3:off 4:off 5:off 6:off rdisc 0:off 1:off 2:off 3:off 4:off 5:off 6:off restorecond 0:off 1:off 2:off 3:off 4:off 5:off 6:off rpcbind 0:off 1:off 2:on 3:on 4:on 5:on 6:off rpcgssd 0:off 1:off 2:off 3:on 4:on 5:on 6:off rpcidmapd 0:off 1:off 2:off 3:on 4:on 5:on 6:off rpcsvcgssd 0:off 1:off 2:off 3:off 4:off 5:off 6:off rsyslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off saslauthd 0:off 1:off 2:off 3:off 4:off 5:off 6:off smartd 0:off 1:off 2:off 3:off 4:off 5:off 6:off smb 0:off 1:off 2:on 3:on 4:on 5:on 6:off <- 3がonになっていることを確認 snmpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off snmptrapd 0:off 1:off 2:off 3:off 4:off 5:off 6:off sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off sysstat 0:off 1:on 2:on 3:on 4:on 5:on 6:off udev-post 0:off 1:on 2:on 3:on 4:on 5:on 6:off