Arch Linux and Clevo W150HNQ

Posted in Uncategorized with tags on September 28, 2011 by Jean Doyon

I will be posting a guid that explains the steps I took in order to get my Clevo laptop working with Arch. Arch Linux is just so sweet!

Find what domain a user is on.

Posted in Administration, VBScript, Windows on July 14, 2011 by Jean Doyon
'=================================================================================================
' TITLE:		getDomain
'
' AUTHOR: 		Jean Doyon
' DATE  : 		2011-07-08
'
' PARAMETERS:	strHost = Machine name to reach.
' RETURNS: String
' COMMENT: Get info from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
'=================================================================================================
Function getDomainName(strHost)
	Dim strUser, strKeyPath, strValueName, strValue, oReg

	Const HKEY_LOCAL_MACHINE = &H80000002
	
	'Prevent the script from stoping when wmi is not able to connect
	On Error Resume Next
	'Connect via WMI
	Set oReg = GetObject("winmgmts:" _
   	& "{impersonationLevel=impersonate}!\\" _
   	& strHost & "\root\default:StdRegProv")
   	
   	If Err <> 0 Then
   		getDomain = "Null"
        Else
		strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
		strValueName = "DefaultDomainName"
		oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
		getDomainName = strValue		
	End If	
End Function

Runnign GPedit on a remote PC

Posted in Uncategorized on April 8, 2011 by Jean Doyon

gpedit.msc /gpcomputer: computername.domain

Some features might be missing.

psexec

Posted in Uncategorized on March 7, 2011 by Jean Doyon

If you don’t know about the pstools from Sysinternals, it’s about time you arrive in town. Actually, Sysinternals was recently bought by Microsoft. So… Yeah.

First of all, search for pstools on the internet. Download them and extract them to a location that is in your path. Personally, I like system32.

There is a ton of useful stuff you can do with them. Kill a process remotely, find the up-time of  a machine, reboot a machine and so on. The example shown here will be installing a package on a remote machine.

First of all, you need to know that when you launch an exe, it will uncompress itself in a temporary folder. For this exact reason, you will need to copy the file you want to install on the target machine.

psexec -c fileToCopy.exe -u username -p password \\hostname

The credentials entered here should have write access (or administrator) on the target machine.

Active yum throught an HTTP proxy requiring a username and password

Posted in Fedora project, Linux on March 4, 2011 by Jean Doyon

Note that this will be activated for all users.

sudo vi /etc/yum.conf

# The proxy server – proxy server:port number
proxy=http://proxy.company.com:8080
# The account details for yum connections
proxy_username=username
proxy_password=password

Dirty sudo setup.

Posted in Fedora project, Linux with tags on March 4, 2011 by Jean Doyon

echo ‘username ALL=(ALL) NOPASSWD:ALL’ >> /etc/sudoers

OS X – Show all files in the Finder

Posted in OS X Snow Leopard on February 26, 2011 by Jean Doyon

In the command line, run the following:

defaults write com.apple.Finder AppleShowAllFiles YES

Restart the finder:

killall Finder && open /System/Library/CoreServices/Finder.app

Sharing files between OSX and Fedora 1X

Posted in Fedora project, Linux, OS X Snow Leopard on March 31, 2010 by Jean Doyon

Following this tutorial will enable you to see your shared files (hosted on Fedora) in the left pane of the Finder on your OSX machine.

<WARNING>

This guide is not complete and I intend to work on it a little more. Hope it is usefull to you! P.S. If you break your PC or drop your coffee on your keyboard, im not responsible.

<WARNING/>

This tutorial assumes you know how to install software from command line using Yellowdog Update Manager (YUM)

First, we need to install netatalk onto our Fedora system.
sudo yum -y install netatalk

Then, edit the AppleTalk Filing Protocol Daemon file.

sudo nano -w /etc/atalk/afpd.conf

Scroll to the bottom of the file and add the following:

- -noddp -tcp -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh

The default enables AppleTalk and TCP and does not advertise over SSH.  The above lines enable only TCP and do advertise over SSH.

Now we need to edit /etc/atalk/netatalk.conf to disable the unwated old technologies.

sudo nano -w /etc/atalk/netatalk.conf

ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no

We’re almost at the wanted result! Just a few more edits and we’re done.

We now have to add the folders we wish to share by editing the AppleVolumes.default in /etc/atalk.

~/ “$u” allow:USERNAME rwlist:USERNAME,@users cnidscheme:cdb

Of cource, change USERNAME to your username. This will share your homefolder.

Now if you want the service to start at book enter the following

sudo chkconfig atalk on

Start the service

service atalk start

Now it’s time to configure Avahi.

Add afpd.service to /etc/avahi/services

sudo nano -w /etc/avahi/services/afpd.service

Copy the following lines in the afpd.service file.

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>

-minor edit-

firewall rules, screens, sources, thank you notes.

Upcoming posts.

Posted in Linux, OS X Snow Leopard with tags , , , , , on February 27, 2010 by Jean Doyon

1) How to enable syntax highlighting for the vim editor on OS X Snow Leopard.
2) Archiving – gzip, bzip2, tar… What’s the difference? When should I use one and not the other?
3) Backing up your data with rsync.
4) Working with services using the ps command.
5) What daemon is running? How to start and stop them.
6) Disabling useless services.
7) Review of Nomachine.com
8) Store your passwords safely with keepass
9) Installing a working multimedia enabled Fedora 12 system.
10) The sudo command explained.

Stay tuned! There is good material coming up!

K thx bye!

I prefer GNOME

Posted in Fedora project, Linux with tags on February 22, 2010 by Jean Doyon

GNOME on Fedora 14

- Menu’s are simple and clear.
- It’s fast.
- It’s minimalistic.
- Deluge > Ktorrent
- Development is active

I use GNOME with the Nimbus thematic.

This is how you install it on Fedora 14 (note that I use a 64bit system).

1) sudo yum install gtk-nimbus-engine.x86_64

2) sudo yum install nimbus-icon-theme.noarch

3) sudo yum install nimbus-metacity-theme.noarch

4) sudo yum install nimbus-theme-gnome.noarch

I will be posting screen-shots very soon.

KDE thx bye!

Follow

Get every new post delivered to your Inbox.