Registrer and earn money just click

Register here, view advertisements and make real money.This site is best for online business you can earn money just by viewing ads and only 10 minutes per day. If you are looking for additional income this site is for you. In time, these additional benefits may exceed your basic income double or even triple.

Tuesday, February 9, 2010

Changing to OpenOffice.org 3.1 in CentOS

One of the things that I wanted to do since the installation of CentOS is to upgrade the currrently default version of OpenOffice.org, which is 2.3, to the latest available version being OpenOffice.org 3.1. I have done these upgrades before on Dreamlinux and (X)Ubuntu but this would be the first time on an “rpm based” distribution.


-- (remove old file openoffice)
-- yum remove openoffice.org-*
--cd (riht click the extracted file copy with root directory)
-- sudo rpm -i *.rpm
--cd desktop-integration
--ls
--yum install (right click not yet extracted file .tar)
--sudo rpm -i (redhat-centos)
cd ../ root
--sudo rpm -i *.rpm
--restart
--finish


Link to Resa's Blogs..

http://resa.linux-hardcore.com/?p=154

Wednesday, February 3, 2010

Ubuntu : Active Directory authentication in Ubuntu 8.04 and 8.10

This is a second version of this other guide that applied to previous Ubuntu versions.
Since Ubuntu 8.04 (Hardy Heron), and now Ubuntu 8.10 (Intrepid Ibex) it come the Likewise Open package that makes basic Active Directory authentication in Ubuntu a breeze.

Just follow these steps:

  1. sudo apt-get update
  2. sudo apt-get install likewise-open
  3. sudo domainjoin-cli join fqdn.of.your.domain Administrator
  4. sudo update-rc.d likewise-open defaults
  5. sudo /etc/init.d/likewise-open start

and you can now log into your machine using your DOMAIN\user credentials. Remember that the DOMAIN\ part is mandatory and that it represents the short name of your Active Directory domain. You can join the domain using any user with sufficient privileges (there’s no need to use Administrator), and you can even directly join the PC in a particular OU passing the –ou argument to domainjoin-cli. The fourth point maybe won’t be necessary when Ubuntu 8.04 LTS wil be released because it seems to be a bug in the package (it won’t start likewise on reboot, so if you don’t issue this command it would seem that nothing is working after a reboot).

I’ve just started to use this method on a test machine so I’ll leave more opinions on this product in the future.

EDIT: First impressions

After some days of not so extensive usage, I’ve seen a couple of things that it’s worth notice:

  • the likewise-open process seems to “die” from time to time, blocking all your login accesses with a “ERROR” message. Restarting it through init script solves the issue… but it’s something that definitely should not happen
  • It informs you on login if your password is going to expire in X days (as set in your GPO). Very nice indeed.

Notes to the readers: if you’re experiencing installation problem, the best way is to report them to the likewise-open-discuss mailing list. There you can contact directly likewise developers (of Samba fame) and solve your problems or doubts.

EDIT2: it seems that with the final Ubuntu 8.04 update, likewise-open package is now 100% stable, I didn’t have a single failure since last update (one week up, while before it died at least once per day)

EDIT3: as mentioned in the comment, with likewise-open 4.x you can add

winbind use default domain = yes

in /etc/samba/lwiauthd.conf so you d’nt have to specify the DOMAIN\ part every time you log in your box.

Samba Active Directory Integration

Accessing a Samba Share

Another, use for Samba is to integrate into an existing Windows network. Once part of an Active Directory domain, Samba can provide file and print services to AD users.

The simplest way to join an AD domain is to use Likewise-open. For detailed instructions see the section called “Likewise Open”.

Once part of the domain, install the following packages:

sudo apt-get install samba smbfs smbclient

Since the likewise-open and samba packages use separate secrets.tdb files, a symlink will need to be created in /var/lib/samba:

sudo mv /var/lib/samba/secrets.tdb /var/lib/samba/secrets.tdb.orig
sudo ln -s /etc/samba/secrets.tdb /var/lib/samba

Next, edit /etc/samba/smb.conf changing:

   workgroup = EXAMPLE
...
security = ads
realm = EXAMPLE.COM
...
idmap backend = lwopen
idmap uid = 50-9999999999
idmap gid = 50-9999999999

Restart samba for the new settings to take effect:

sudo /etc/init.d/samba restart

You should now be able to access any Samba shares from a Windows client. However, be sure to give the appropriate AD users or groups access to the share directory. See the section called “Securing a Samba File and Print Server” for more details.

Accessing a Windows Share

Now that the Samba server is part of the Active Directory domain you can access any Windows server shares:

  • To mount a Windows file share enter the following in a terminal prompt:

    mount.cifs //fs01.example.com/share mount_point

    It is also possible to access shares on computers not part of an AD domain, but a username and password will need to be provided.

  • To mount the share during boot place an entry in /etc/fstab, for example:

    //192.168.0.5/share /mnt/windows cifs auto,username=steve,password=secret,rw 0        0
  • Another way to copy files from a Windows server is to use the smbclient utility. To list the files in a Windows share:

    smbclient //fs01.example.com/share -k -c "ls"
  • To copy a file from the share, enter:

    smbclient //fs01.example.com/share -k -c "get file.txt"

    This will copy the file.txt into the current directory.

  • And to copy a file to the share:

    smbclient //fs01.example.com/share -k -c "put /etc/hosts hosts"

    This will copy the /etc/hosts to //fs01.example.com/share/hosts.

  • The -c option used above allows you to execute the smbclient command all at once. This is useful for scripting and minor file operations. To enter the smb: \> prompt, a FTP like prompt where you can execute normal file and directory commands, simply execute:

    smbclient //fs01.example.com/share -k
[Note]

Replace all instances of fs01.example.com/share, //192.168.0.5/share, username=steve,password=secret, and file.txt with your server's IP, hostname, share name, file name, and an actual username and password with rights to the share.



Likewise Open - winbind based


Likewise Open simplifies the necessary configuration needed to authenticate a Linux machine to an Active Directory domain. Based on winbind, the likewise-open package takes the pain out of integrating Ubuntu authentication into an existing Windows network.

Installation

There are two ways to use Likewise Open, likewise-open the command line utility and likewise-open-gui. This section focuses on the command line utility.

To install the likewise-open package, open a terminal prompt and enter:

sudo apt-get install likewise-open

With Ubuntu 9.04 Likewise Open 5.0 is available in the Universe repository. However, since upgrading from Likewise Open 4.1 currently requires the system to leave the domain and re-join, a separate package for version five was created.

To install Likewise Open 5.0 enter:

sudo apt-get install likewise-open5
[Warning]

Installing likewise-open5 over an existing likewise-open (4.1) installation will replace it. You will have to rejoin the domain after install.

Joining a Domain

The main executable file of the likewise-open package is /usr/bin/domainjoin-cli, which is used to join your computer to the domain. Before you join a domain you will need to make sure you have:

  • Access to an Active Directory user with appropriate rights to join the domain.

  • The Fully Qualified Domain Name (FQDN) of the domain you want to join. If your AD domain does not match a valid domain such as example.com, it is likely that it has the form of domainname.local.

  • DNS for the domain setup properly. In a production AD environment this should be the case. Proper Microsoft DNS is needed so that client workstations can determine the Active Directory domain is available.

    If you don't have a Windows DNS server on your network, see the section called “Microsoft DNS” for details.

To join a domain, from a terminal prompt enter:

sudo domainjoin-cli join example.com Administrator
[Note]

Replace example.com with your domain name, and Administrator with the appropriate user name.

You will then be prompted for the user's password. If all goes well a SUCCESS message should be printed to the console.

[Note]

After joining the domain, it is necessary to reboot before attempting to authenticate against the domain.

After successfully joining an Ubuntu machine to an Active Directory domain you can authenticate using any valid AD user. To login you will need to enter the user name as 'domain\username'. For example to ssh to a server joined to the domain enter:

ssh 'example\steve'@hostname
[Note]

If configuring a Desktop the user name will need to be prefixed with domain\ in the graphical logon as well.

To make likewise-open use a default domain, you can add the following statement to /etc/samba/lwiauthd.conf:

winbind use default domain = yes

Then restart the likewise-open daemons:

sudo /etc/init.d/likewise-open restart
[Note]

Once configured for a default domain the 'domain\' is no longer required, users can login using only their username.

The domainjoin-cli utility can also be used to leave the domain. From a terminal:

sudo domainjoin-cli leave

Other Utilities

The likewise-open package comes with a few other utilities that may be useful for gathering information about the Active Directory environment. These utilities are used to join the machine to the domain, and are the same as those available in the samba-common and winbind packages:

  • lwinet: Returns information about the network and the domain.

  • lwimsg: Allows interaction with the likewise-winbindd daemon.

  • lwiinfo: Displays information about various parts of the Domain.

Please refer to each utility's man page specific for details.

Troubleshooting

  • If the client has trouble joining the domain, double check that the Microsoft DNS is listed first in /etc/resolv.conf. For example:

    nameserver 192.168.0.1
  • For more information when joining a domain, use the --loglevel verbose or --advanced option of the domainjoin-cli utility:

    sudo domainjoin-cli --loglevel verbose join example.com Administrator
  • If an Active Directory user has trouble logging in, check the /var/log/auth.log for details.

  • When joining an Ubuntu Desktop workstation to a domain, you may need to edit /etc/nsswitch.conf if your AD domain uses the .local syntax. In order to join the domain the "mdns4" entry from the hosts option. For example:

    hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

    Change the above to:

    hosts: files dns [NOTFOUND=return]

    Then restart networking by entering:

    sudo /etc/init.d/networking restart

    You should now be able to join the Active Directory domain.

Microsoft DNS

The following are instructions for installing DNS on an Active Directory domain controller running Windows Server 2003, but the instructions should be similar for other versions:

  • Click StartAdministrative ToolsManager Your Server. This will open the Server Role Mangement utility.

    1. Click Add or remove a role

    2. Click Next

    3. Select "DNS Server"

    4. Click Next

    5. Next

    6. Select "Create a forward lookup zone" if it is not selected.

    7. Click Next

    8. Make sure "This server maintains the zone" is selected and click Next.

    9. Enter your domain name and click Next

    10. Click Next to "Allow only secure dynamic updates"

    11. Click Next to "Allow only secure dynamic updates"

    12. Enter the IP for DNS servers to forward queries to, or Select "No, it should not forward queries" and click Next.

    13. Click Finish

    14. Click Finish

    DNS is now installed and can be further configured using the Microsoft Management Console DNS snap-in.

  • Next, configure the Server to use itself for DNS queries:

    1. Click Start

    2. Control Panel

    3. Network Connections

    4. Right Click "Local Area Connection"

    5. Click Properties

    6. Double click "Internet Protocol (TCP/IP)"

    7. Enter the Server's IP Address as the "Preferred DNS server"

    8. Click Ok

    9. Click Ok again to save the settings