Citrix XenApp

Your Journey towards cloud.

Showing posts with label Red Hat. Show all posts
Showing posts with label Red Hat. Show all posts

Sunday, 15 July 2012

How to mount samba share on Linux client

Samba can be used to allow connectivity between Linux and Windows. Samba can be used to share printers, share directories, connect to an windows domain, and many other useful features.In order to mount your samba share to your Linux client open up the /etc/fstab file and insert the following line into this file//172.19.12.137/Music /mnt/samba cifs credentials=/etc/accessfile 0 0Now create a new file: /etc/accessfile with following contentsusername=Suhailpassword=some_passwordSave the above file and restart your Linux client (or type command mount...

Saturday, 14 July 2012

How to Convert smbpasswd to tdbsam on Samba

The latest release of Samba offers many new features including new password database backends not previously available. Samba version 3.0.0 fully supports all databases used in previous versions of Samba. However, although supported, many backends may not be suitable for production use.The tdbsam backend provides an ideal database back-end for local servers, servers that do not need built-in database replication, and servers that do not require the scalability or complexity of LDAP. The tdbsam back-end includes all of the smbpasswd database...

Friday, 13 July 2012

Creating Recycle Bin for Samba storage

Samba is mainly used to share the files between Linux and windows and many times it happens that user deletes the file from the samba server and later wants to get back deleted files which is not possible with the default configuration of samba server.The best option is to have a "Recycle bin" for every users on the samba server.Here is an example of modifying the home directories of your users in samba configuration file[homes]comment = Home Directoryvalid users = %Sbrowsable = noguest ok = noread only = novfs object = recyclerecycle:repository...

Thursday, 12 July 2012

Transfer Linux user to Samba users

To configure Samba on your Red Hat Linux system to use encrypted passwords, follow these steps:1. Create a separate password file for Samba. To create one based on your existing /etc/passwd file, at a shell prompt, type the following command:# cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswdIf the system uses NIS, type the following command:# ypcat passwd | mksmbpasswd.sh > /etc/samba/smbpasswdThe mksmbpasswd.sh script is installed in your /usr/bin directory with the samba package.2. Change the permissions of the Samba password file...

Wednesday, 11 July 2012

Sync users' Samba passwords with their system passwords

The pam_smbpass PAM module can be used to sync users' Samba passwords with their system passwords when the passwd command is used. If a user invokes the passwd command, the password the uses to log in to the system as well as the password he must provide to connect to a Samba share are changed.To enable this feature, add the following line to /etc/pam.d/system-auth below the pam_cracklib.so invocation:password required /lib/security/pam_smbpass.so nullok use_authtok try_first_p...

Tuesday, 10 July 2012

Sync Samba and Unix password

The pam_smbpass PAM module can be used to sync users’ Samba passwords with their system passwords. If a user invokes the passwd command, the password he uses to log in to the system as well as the password he must provide to connect to a Samba share are changed. To enable this feature, add the following line to /etc/pam.d/system-auth below the pam_cracklib.so invocation:password required /lib/security/pam_smbpass.so nullok use_authtok try_first_p...

Sunday, 8 July 2012

Mount Samba share using fstab

To mount a Samba share when Linux system comes up after rebootedit the /etc/fstab file and put entry as follows for your Windows/Samba share://ntserver/share /mnt/samba smbfs username=username,password=password 0 0 For example,if you want to mount a share called //ntserver/docs then you need to write following entry in /etc/fstab file://192.168.0.1/share /mnt/samba smbfs username=sohail,password=passwd123 0 ...

Friday, 6 July 2012

Using Samba As File Server in Linux with guest(Anonymous) login and read-write access

1. Create a folder for share purpose    mkdir sharedrive2.Give full access to that folder   chmod 777 sharedrive 3.Edit smb conf file vi /etc/samba/smb.conf[global]# workgroup = NT-Domain-Name or Workgroup-Name   workgroup = WORKGROUP                                                                               ...

Thursday, 5 July 2012

Setting Hostname(Computer Name) in Linux (RedHat)

Edit the following files with vi 1.           /etc/hosts # Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1    localhost.localdomain localhost 192.168.0.20    sohail.bom.labs.net 2.          /etc/sysconfig/networkNETWORKING=yesHOSTNAME=sohail.bom.labs....

Wednesday, 4 July 2012

Configure ipaddress in linux

1.edit the file with vi vi/etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0ONBOOT=yesBOOTPROTO=staticIPADDR=192.168.0.20NETMASK=255.255.255.0GATEWAY=192.168.0.1 2.To put Dns Server ip addressvi /etc/resolv.confnameserver=192.168.0.103.restart the network serviceservice network rest...

Friday, 22 June 2012

Lock User Accounts After Too Many Login Failures

Add the following two lines highlighted in blue to the /etc/pam.d/system-auth file as shown below: auth required /lib/security/$ISA/pam_env.soauth required /lib/security/$ISA/pam_tally.so  onerr=fail no_magic_rootauth sufficient /lib/security/$ISA/pam_unix.so likeauth  nullokauth required /lib/security/$ISA/pam_deny.soaccount required /lib/security/$ISA/pam_unix.soaccount required /lib/security/$ISA/pam_tally.so ...

Sunday, 6 May 2012

VSFTPD - limit the number of simultaneous connections for a single IP address

By default VSFTPD allows unlimited connection from the same client IP address.1: Open vsftpd.conf fileUse text editor such as vi to edit /etc/vsftpd.conf or /etc/vsftpd/vsftpd.conf file:# vi vsftpd.conf2: Setup limitationSet up the max_per_ip=4 (this will limit simultaneous connection to 4 number only)max_per_ip=43: Restart vsftpd# /etc/init.d/vsftpd restart&nb...

Saturday, 5 May 2012

Get Hostname from IP address

To get the hostname from the IP address.The simplest way is to use the “host” utility provided by Gnu/Linux. Just run…poison:~ # host 64.233.187.9999.187.233.64.in-addr.arpa domain name pointer jc-in-f99.google.com.poison:~ # This will query the name server and provide you with the hostname of the IP address.By default it will query the nameserver listed in the /etc/resolv.conf file....

Friday, 4 May 2012

Quick configuration of NFS

NFS Consists of the following:/etc/exports –> /etc/exports contains all the NFS shares/usr/sbin/exportfs -r#exportfs -r is used to synchronize nfsd in memory with the /etc/exports file#Use exportfs -v to see which shares nfsd is currently exporting/etc/rc.d/init.d/nfslock - which has 2 parts/sbin/rpc.lockd/sbin/rpc.statd/etc/rc.d/init.d/nfs - which has 3 parts/usr/sbin/rpc.rquotad/usr/sbin/rpc.mountd/usr/sbin/rpc.nfsdAt bare minimum you need to have portmap (or portmapper), mountd (or rpc.mountd), and nfsd (or rpc.nfsd) running; otherwise...

Thursday, 3 May 2012

How To disable telnet service

Login as root to your server:Edit /etc/xinetd.d/telnet# vi /etc/xinetd.d/telnetSearch for: "disable = no"Change it to: disable = yesSave and ExitRestart xinted# /etc/rc.d/init.d/xinetd rest...

Wednesday, 2 May 2012

How to disable CTRL-ALT-DEL from rebooting a Linux system

The action taken for CTRL-ALT-DEL is defined in /etc/inittab and if we will look in that file we will see a line similar to the one from bellow :ca::ctrlaltdel:/sbin/shutdown -t3 -r nowIf we want to disable this action we only have to change this line. We can delete it, comment it, or even replace it with something like: ca:12345:ctrlaltdel:/bin/echo "CTRL-ALT-DEL is disabled"After making any changes to the inittab file, you will have to tell init to reload it, in order to activate the changes. To do that, simply run as root:init...

Tuesday, 1 May 2012

Allow normal user to mount cdrom

By default, this device is not accessible by all of your users. To allow users to mount the CDROM drive, login as root and execute the following command# chmod a+r /dev/cdromThis will allow any user on your Linux system to mount the CDROM drive from their console or deskt...

Sunday, 6 March 2011

Install Vmware tools in Linux

1.Mount Vmware Tools to cdrom2.Copy it to Home directory   cp /mnt/cdrom/VMwareTools-8.8.2-590212.tar.gz /3.Untar    tar zxf VMwareTools-8.8.2-590212.tar.gz4.change to the unzipped directory    cd vmware-tools-distrib/5.Install   ./vmware-install.pl                 ...

Wednesday, 2 March 2011

Shutdown or Restart redhat Linux

1.For Shutdown          poweroff2.For Restart          reboot       ...

Tuesday, 1 March 2011

Configure Dhcp Server with Red Hat Linux

1. Configure /etc/dhcpd.conf -                   Does not exist by default           Copy sample from the DHCP documentation.[ i.e Do this : # cp dhcpd.conf.sample /etc/dhcpd.conf ]                  Delete everyting in it and keep this much  Now your new /etc/dhcpd.conf should look like this :  vi /etc/dhcpd.conf   ================  ...