Aici veti gasi detalii tehnice despre cum se pot realiza configurari software+ hardware.
Here you can find tehnical details about software/hardware configuration.

miercuri, 2 decembrie 2015

Clear account in Outlook 2010 run in Playonlinux with wine



To simulate a click to the control panel icon, you have to do the following

export WINEARCH="win32"
export WINEPREFIX="/home/radut/.PlayOnLinux/wineprefix/Office2010"

After that run:

wine /home/radut/.wine/drive_c/windows/system32/rundll32.exe \
shell32.dll,Control_RunDLL \
"/home/radut/.PlayOnLinux/wineprefix/Office2010/drive_c/Program Files/Microsoft Office/Office14/MLCFG32.CPL"

radut is my user but you need to change.

The Email control panel will be appear but you can use only button for change profiles.
 
Show Profiles -> Remove 


sâmbătă, 17 octombrie 2015

Upgrade from Mageia 4 to Mageia 5

Step 1
# Update your system packages to latest version #
# urpmi --auto-update
or 
# urpmi.update -a 
 
Step 2 
# Removing existing media from system #
 
# urpmi.removemedia -a 
 
 
Step 3
# Add media from Mageia 5 (In the future this links may not be aviable)
# Mageia 5 Mirror Server for 64-bit #
# urpmi.addmedia --distrib --mirrorlist 'http://mirrors.mageia.org/api/mageia.5.x86_64.list'

# Mageia 5 Mirror Server for 32-bit #
# urpmi.addmedia --distrib --mirrorlist 'http://mirrors.mageia.org/api/mageia.5.i586.list'
 
Step 4
# Start Upgrading Mageia 5 #
# urpmi --replacefiles --auto-update --auto 

vineri, 18 septembrie 2015

Setting up disks with FreeBSD.

Setting up disks with FreeBSD.

The New Standard: GPT

GPT is the newer and more versatile partition method. Use it unless compatibility with the old standard MBR is required.
The disk device being set up here is da0.
Create a GPT partition scheme on /dev/da0. /dev/ is implied:
# gpart create -s gpt da0
da0 created
Create a boot partition to hold the loader, size of 512K. Give it a GPT label of gpboot, which will show up in /dev/gpt when the device is discovered:
# gpart add -t freebsd-boot -l gpboot -b 40 -s 512K da0
da0p1 added
Install the GPT bootcode into the boot partition:
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
bootcode written to da0
Create a partition for /. It should start at the 1M boundary for proper sector alignment on 4K sector drives or SSDs. This is compatible with GPT drive layout for many other systems. Give it a GPT label of gprootfs.
# gpart add -t freebsd-ufs -l gprootfs -b 1M -s 2G da0
da0p2 added
Create partitions for swap, /var, /tmp, /usr. Leaving the -s size option off the last uses the rest of the disk. As long as these are even sizes in M or G, the alignment will remain correct. Add -a 1M to force alignment of both starting position and size to one megabyte.
# gpart add -t freebsd-swap -l gpswap -s 512M da0
da0p3 added
# gpart add -t freebsd-ufs  -l gpvarfs -s 1G da0
da0p4 added
# gpart add -t freebsd-ufs  -l gptmpfs -s 256M da0
da0p5 added
# gpart add -t freebsd-ufs  -l gpusrfs -a 1M da0
da0p6 added
# gpart show -l da0
=>      34  19640813  da0  GPT  (9.4G)
        34         6       - free -  (3.0k)
        40      1024    1  gpboot  (512k)
      1064       984       - free -  (492k)
      2048   4194304    2  gprootfs  (2.0G)
   4196352   1048576    3  gpswap  (512M)
   5244928   2097152    4  gpvarfs  (1.0G)
   7342080    524288    5  gptmpfs  (256M)
   7866368  11773952    6  gpusrfs  (5.6G)
Tip
If there’s a need or desire to redo this partition layout, gpart(8) won’t destroy the "geom" until all of the partitions in it have been deleted:
# gpart delete -i 1 da0
da0p1 deleted
# gpart delete -i 2 da0
da0p2 deleted
# gpart delete -i 3 da0
da0p3 deleted
# gpart delete -i 4 da0
da0p4 deleted
# gpart delete -i 5 da0
da0p5 deleted
# gpart delete -i 6 da0
da0p6 deleted
# gpart destroy da0
Later versions of gpart(8) have a -F (force) option for destroy that makes things quicker but sort of blunt and stabby at the same time:
# gpart destroy -F da0
da0 destroyed
Format the new filesystems, enabling soft updates for performance. Filesystem labels can be added here, but probably should not be the same as the GPT labels already assigned.
# newfs -U /dev/gpt/gprootfs
# newfs -U /dev/gpt/gpvarfs
# newfs -U /dev/gpt/gptmpfs
# newfs -U /dev/gpt/gpusrfs
See http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#SAFE-SOFTUPDATES for more information on using soft updates on the root filesystem.
Restore data. Labels are used in the mount command here because they’re easier to identify, but device names like /dev/da0p2 will work.
# mount /dev/gpt/gprootfs /mnt
# (cd /mnt && gzcat root.dump.gz | restore -ruf -)
# umount /mnt
Repeat for /var, /tmp, /usr.
Modify /etc/fstab:
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/gpt/gpswap         none            swap    sw              0       0
/dev/gpt/gprootfs       /               ufs     rw              1       1
/dev/gpt/gptmpfs        /tmp            ufs     rw              2       2
/dev/gpt/gpusrfs        /usr            ufs     rw              2       2
/dev/gpt/gpvarfs        /var            ufs     rw              2       2
Done!

The Old Standard: MBR

Usually the GPT setup above is the better choice. This older method creates an MBR partition table, which can be useful for backwards compatibility.
Again, we’re setting up da0.
Warning
If remnants of a GPT partitioning scheme are still present on the disk, it will be seen instead of the MBR. Destroying that old partitioning scheme before creating the new MBR is important.
# gpart destroy -F da0
Older versions of gpart(8) did not have -F to easily remove old partition schemes without deleting all partitions first. An alternate way to remove GPT tables is using dd(1) to overwrite the GPT primary table at the start of the disk:
# dd if=/dev/zero of=/dev/da0 bs=512 count=34
Removing the secondary or backup GPT table at the end of the disk requires a little calculation. Use diskinfo(8) to get the number of blocks, subtract the 34-block length of the standard table, and write from there to the end of the disk. In this example, the disk has 60030432 blocks. Subtracting 34 from that gives 60030398 as the starting location, and dd(1) will write from there to the end of the disk.
# diskinfo -v da0
        512             # sectorsize
        30735581184     # mediasize in bytes (28G)
        60030432        # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        3736            # Cylinders according to firmware.
        255             # Heads according to firmware.
        63              # Sectors according to firmware.
        560482EC2222    # Disk ident.
# echo '60030432 - 34' | bc
60030398
# dd if=/dev/zero of=/dev/da0 bs=512 seek=60030398
Create the MBR partitioning scheme:
# gpart create -s mbr da0
Make it bootable by installing bootcode.
# gpart bootcode -b /boot/mbr da0
Create an MBR partition. FreeBSD calls these "slices". Set it active so the system will boot from it.
# gpart add -t freebsd da0
# gpart set -a active -i 1 da0
Inside the FreeBSD slice, create a bsdlabel partitioning scheme. Bootcode is needed here also.
# gpart create -s bsd da0s1
# gpart bootcode -b /boot/boot da0s1
Create the FreeBSD "partitions" inside the slice.
# gpart add -t freebsd-ufs  -a 4k -s 2g   da0s1
# gpart add -t freebsd-swap -a 4k -s 512m da0s1
# gpart add -t freebsd-ufs  -a 4k -s 1g   da0s1
# gpart add -t freebsd-ufs  -a 4k -s 256m da0s1
# gpart add -t freebsd-ufs  -a 4k         da0s1
Format and label the filesystems before they are mounted, enabling soft updates for better performance:
# glabel label swap /dev/da0s1b
# newfs -L rootfs -U /dev/da0s1a
# newfs -L varfs  -U /dev/da0s1d
# newfs -L tmpfs  -U /dev/da0s1e
# newfs -L usrfs  -U /dev/da0s1f
See http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#SAFE-SOFTUPDATES for more information on using soft updates on the root filesystem.
Restore data to the new filesystems:
# mount /dev/da0s1a /mnt
# gzcat root.dump.gz | (cd /mnt && restore -rf -)
# umount /mnt
Repeat for /var, /tmp, /usr.
Modify /etc/fstab:
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/label/swap         none            swap    sw              0       0
/dev/ufs/rootfs         /               ufs     rw              1       1
/dev/ufs/tmpfs          /tmp            ufs     rw              2       2
/dev/ufs/usrfs          /usr            ufs     rw              2       2
/dev/ufs/varfs          /var            ufs     rw              2       2
Done!
.

The New Standard: GPT

GPT is the newer and more versatile partition method. Use it unless compatibility with the old standard MBR is required.
The disk device being set up here is da0.
Create a GPT partition scheme on /dev/da0. /dev/ is implied:
# gpart create -s gpt da0
da0 created
Create a boot partition to hold the loader, size of 512K. Give it a GPT label of gpboot, which will show up in /dev/gpt when the device is discovered:
# gpart add -t freebsd-boot -l gpboot -b 40 -s 512K da0
da0p1 added
Install the GPT bootcode into the boot partition:
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
bootcode written to da0
Create a partition for /. It should start at the 1M boundary for proper sector alignment on 4K sector drives or SSDs. This is compatible with GPT drive layout for many other systems. Give it a GPT label of gprootfs.
# gpart add -t freebsd-ufs -l gprootfs -b 1M -s 2G da0
da0p2 added
Create partitions for swap, /var, /tmp, /usr. Leaving the -s size option off the last uses the rest of the disk. As long as these are even sizes in M or G, the alignment will remain correct. Add -a 1M to force alignment of both starting position and size to one megabyte.
# gpart add -t freebsd-swap -l gpswap -s 512M da0
da0p3 added
# gpart add -t freebsd-ufs  -l gpvarfs -s 1G da0
da0p4 added
# gpart add -t freebsd-ufs  -l gptmpfs -s 256M da0
da0p5 added
# gpart add -t freebsd-ufs  -l gpusrfs -a 1M da0
da0p6 added
# gpart show -l da0
=>      34  19640813  da0  GPT  (9.4G)
        34         6       - free -  (3.0k)
        40      1024    1  gpboot  (512k)
      1064       984       - free -  (492k)
      2048   4194304    2  gprootfs  (2.0G)
   4196352   1048576    3  gpswap  (512M)
   5244928   2097152    4  gpvarfs  (1.0G)
   7342080    524288    5  gptmpfs  (256M)
   7866368  11773952    6  gpusrfs  (5.6G)
Tip
If there’s a need or desire to redo this partition layout, gpart(8) won’t destroy the "geom" until all of the partitions in it have been deleted:
# gpart delete -i 1 da0
da0p1 deleted
# gpart delete -i 2 da0
da0p2 deleted
# gpart delete -i 3 da0
da0p3 deleted
# gpart delete -i 4 da0
da0p4 deleted
# gpart delete -i 5 da0
da0p5 deleted
# gpart delete -i 6 da0
da0p6 deleted
# gpart destroy da0
Later versions of gpart(8) have a -F (force) option for destroy that makes things quicker but sort of blunt and stabby at the same time:
# gpart destroy -F da0
da0 destroyed
Format the new filesystems, enabling soft updates for performance. Filesystem labels can be added here, but probably should not be the same as the GPT labels already assigned.
# newfs -U /dev/gpt/gprootfs
# newfs -U /dev/gpt/gpvarfs
# newfs -U /dev/gpt/gptmpfs
# newfs -U /dev/gpt/gpusrfs
See http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#SAFE-SOFTUPDATES for more information on using soft updates on the root filesystem.
Restore data. Labels are used in the mount command here because they’re easier to identify, but device names like /dev/da0p2 will work.
# mount /dev/gpt/gprootfs /mnt
# (cd /mnt && gzcat root.dump.gz | restore -ruf -)
# umount /mnt
Repeat for /var, /tmp, /usr.
Modify /etc/fstab:
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/gpt/gpswap         none            swap    sw              0       0
/dev/gpt/gprootfs       /               ufs     rw              1       1
/dev/gpt/gptmpfs        /tmp            ufs     rw              2       2
/dev/gpt/gpusrfs        /usr            ufs     rw              2       2
/dev/gpt/gpvarfs        /var            ufs     rw              2       2
Done!

The Old Standard: MBR

Usually the GPT setup above is the better choice. This older method creates an MBR partition table, which can be useful for backwards compatibility.
Again, we’re setting up da0.
Warning
If remnants of a GPT partitioning scheme are still present on the disk, it will be seen instead of the MBR. Destroying that old partitioning scheme before creating the new MBR is important.
# gpart destroy -F da0
Older versions of gpart(8) did not have -F to easily remove old partition schemes without deleting all partitions first. An alternate way to remove GPT tables is using dd(1) to overwrite the GPT primary table at the start of the disk:
# dd if=/dev/zero of=/dev/da0 bs=512 count=34
Removing the secondary or backup GPT table at the end of the disk requires a little calculation. Use diskinfo(8) to get the number of blocks, subtract the 34-block length of the standard table, and write from there to the end of the disk. In this example, the disk has 60030432 blocks. Subtracting 34 from that gives 60030398 as the starting location, and dd(1) will write from there to the end of the disk.
# diskinfo -v da0
        512             # sectorsize
        30735581184     # mediasize in bytes (28G)
        60030432        # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        3736            # Cylinders according to firmware.
        255             # Heads according to firmware.
        63              # Sectors according to firmware.
        560482EC2222    # Disk ident.
# echo '60030432 - 34' | bc
60030398
# dd if=/dev/zero of=/dev/da0 bs=512 seek=60030398
Create the MBR partitioning scheme:
# gpart create -s mbr da0
Make it bootable by installing bootcode.
# gpart bootcode -b /boot/mbr da0
Create an MBR partition. FreeBSD calls these "slices". Set it active so the system will boot from it.
# gpart add -t freebsd da0
# gpart set -a active -i 1 da0
Inside the FreeBSD slice, create a bsdlabel partitioning scheme. Bootcode is needed here also.
# gpart create -s bsd da0s1
# gpart bootcode -b /boot/boot da0s1
Create the FreeBSD "partitions" inside the slice.
# gpart add -t freebsd-ufs  -a 4k -s 2g   da0s1
# gpart add -t freebsd-swap -a 4k -s 512m da0s1
# gpart add -t freebsd-ufs  -a 4k -s 1g   da0s1
# gpart add -t freebsd-ufs  -a 4k -s 256m da0s1
# gpart add -t freebsd-ufs  -a 4k         da0s1
Format and label the filesystems before they are mounted, enabling soft updates for better performance:
# glabel label swap /dev/da0s1b
# newfs -L rootfs -U /dev/da0s1a
# newfs -L varfs  -U /dev/da0s1d
# newfs -L tmpfs  -U /dev/da0s1e
# newfs -L usrfs  -U /dev/da0s1f
See http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#SAFE-SOFTUPDATES for more information on using soft updates on the root filesystem.
Restore data to the new filesystems:
# mount /dev/da0s1a /mnt
# gzcat root.dump.gz | (cd /mnt && restore -rf -)
# umount /mnt
Repeat for /var, /tmp, /usr.
Modify /etc/fstab:
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/label/swap         none            swap    sw              0       0
/dev/ufs/rootfs         /               ufs     rw              1       1
/dev/ufs/tmpfs          /tmp            ufs     rw              2       2
/dev/ufs/usrfs          /usr            ufs     rw              2       2
/dev/ufs/varfs          /var            ufs     rw              2       2
Done!
source

vineri, 21 august 2015

FreeBSD Chroot SSH user in folder

First... you need to create a user

adduser or
pw useradd testuser -d /usr/local/testuser -s /bin/sh
chown root:testuser /home/testuser # root must own the chroot directory
cp /rescue/sh /home/testuser/bin/
 
In /etc/ssh/sshd_config you must add following lines:
=================================
Match User testuser
    PasswordAuthentication yes
    ChrootDirectory /home/testuser
#    ForceCommand internal-sftp
    AllowTcpForwarding no
    AllowAgentForwarding no
    PermitTunnel no
#    PermitTTY no
    X11Forwarding no
================================
After that restart sshd daemon:    /etc/rc.d/sshd restart

Now... try to login for the first time.

$ ssh testuser@x.x.x.x
Password for testuser@x.x.x.x:
X11 forwarding request failed on channel 0
Last login: Thu Aug 20 15:00:09 2015 from y.y.y.y
Could not chdir to home directory /home/testuser: No such file or directory
Cannot read termcap database;
using dumb terminal settings.
$ ls
ls: not found
$ mc
mc: not found

In this point the test user can run any command.
We must create a folder structure like in main OS. (/bin,/sbin,/usr/bin,/usr/sbin, etc...)
We need to copy all executable and library files from main OS to testuser folders.
 
To install Midnight Commander you can try following procedure:
 
 
 # locate mc | grep bin
/usr/local/bin/mc
 
cp /usr/local/bin/mc /home/testuser/bin/mc
==============
 $ mc  
ELF interpreter /libexec/ld-elf.so.1 not found
Abort trap 
(In this point i copy ld-elf.so.1 to /home/testuser/libexec/ld-elf.so.1)
$ mc
Shared object "libslang.so.2" not found, required by "mc"
$ mc
Shared object "libncurses.so.8" not found, required by "mc"
$ mc
Shared object "libssh2.so.1" not found, required by "mc"
$ mc
Shared object "libgmodule-2.0.so.0" not found, required by "mc"

...........

After I copy all libraries, run again mc

$ mc

(mc:4253): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Cannot create /home/testuser/.cache/mc directory

Create manual .cache/mc folder in /testuser directory
We will have following structure:
/home/testuser/home/testuser/.cache/mc

After this operation i download mc txz file from Latest.

-Open txz file and copy manual files in folders.

-copy termcap and termcap.db files

cp /usr/share/misc/termcap.db /home/testuser/usr/share/misc/termcap.db
cp /usr/share/misc/termcap /home/testuser/usr/share/misc/termcap 
copy and symlink
cp /etc/termcap /home/testuser/etc/termcap 
 
All done
Nou chrooted user can run mc in own folder.
If you want to give acces to other commands just copy files in own folder structure. 
 
 

 
 

Map


Visitor Map