SAMBA Server configuration....
# yum install samba
Configuration File- /etc/samba/smb.conf
**Assume we will create directory as /samba_share
#mkdir /samba_share
#chmod 777 /samba_share
# vi /et/samba/smb.conf
**Add these lines at end of the file***
[my_share]
path=/samba_sahre (give your path that want to share)
writable=yes (for read write permission)
public=yes
browsable=yes
validusers= smbuser
now save and exit.
# useradd smbuser
#smbpasswd smbuser
Password _________ (type password you want to set for smbuser.)
Password _________ ( Retype the same)
** smbpasswd is valid for smb-client login not for user login.
#service smb restart
** For getting home directory in clinet side..
#setsebool -P samba_enable_home_dir_on
** For testing it is getting home directory or not...
#smbclient //SERVERX/samba_share -U smbuser
Password ________ (Type the password here)
Mounting a samba file system manually..
# mount -t cifs -o username=userid,workgroup=workgroupname,password=XXXXX //ipadd/sharepoint /mountpoint/
Mounting a cifs permanently by editing /etc/fstab file
Add the below line into /etc/fstab
# yum install samba
Configuration File- /etc/samba/smb.conf
**Assume we will create directory as /samba_share
#mkdir /samba_share
#chmod 777 /samba_share
# vi /et/samba/smb.conf
**Add these lines at end of the file***
[my_share]
path=/samba_sahre (give your path that want to share)
writable=yes (for read write permission)
public=yes
browsable=yes
validusers= smbuser
now save and exit.
# useradd smbuser
#smbpasswd smbuser
Password _________ (type password you want to set for smbuser.)
Password _________ ( Retype the same)
** smbpasswd is valid for smb-client login not for user login.
#service smb restart
** For getting home directory in clinet side..
#setsebool -P samba_enable_home_dir_on
** For testing it is getting home directory or not...
#smbclient //SERVERX/samba_share -U smbuser
Password ________ (Type the password here)
Mounting a samba file system manually..
# mount -t cifs -o username=userid,workgroup=workgroupname,password=XXXXX //ipadd/sharepoint /mountpoint/
Mounting a cifs permanently by editing /etc/fstab file
Add the below line into /etc/fstab
#vi /etc/fstab
//192.168.0.1/share1 /mnt cifs rw,user,username=xxxx,password=xxxx 0 0
If you want to more secure, then you can do....
#cd ~
#echo username=xxxxx > .smbfile
#echo password=xxxx >> .smbfile
#chmod 600 .smbfile
Then edit the /etc/fstab file and specify the entries as below
#vi /etc/fstab
//192.168.0.1/share1 /mount point cifs credentials=/home/myhomedirectoryofuser/. smbfile,rw,user 0 0
No comments:
Post a Comment