Friday, February 19, 2016
HowTo moving to Stack Exchange
For some time I've been using and posting 'How To' material to Stack Exchange. For now a few new topics to get ready for a short talk on opensource.
Thursday, January 2, 2014
HowTo Clean One Account, All of Google in Firefox
Add Greasemonkey to Firefox
Installing Greasemonkey Scripts
Google Account Chooser Cleaner
The three steps listed above provide a method to clean this feature, and let you log out and log into different accounts.
Installing Greasemonkey Scripts
Google Account Chooser Cleaner
One account. All of Google.
We've remembered your account on this device to make your future sign-ins easier. Just enter your password to sign back in.This is the new Google way, locking your account to a device and making it impractical to log onto multiple accounts on the same machine. Flushing the browser cache, history, and cookies doesn't clear it. Besides making gmail accounts difficult to use. Nowadays, one has to wonder the motives behind forcing a userid to a specific device.
The three steps listed above provide a method to clean this feature, and let you log out and log into different accounts.
Tuesday, July 9, 2013
How to Add a PPA to Ubuntu
How to Add a PPA to Ubuntu | OMG! Ubuntu!
Gitolite on Ubuntu: No admin key given
This adds the extra steps to bring in a ppa, install a new package, and reconfigure something like Gitolite3.
Replace ppa:snapy/ppa with your launchpad.
Replace gitolite3 with your package.
First, find a package you want. I generally check to see if it's in the next release; easier to upgrade later.
https://launchpad.net/~snapy/+archive/ppa
From a terminal window:
sudo add-apt-repository ppa:snapy/ppa
sudo apt-get update
sudo apt-cache gencaches
apt-cache search gitolite3
sudo apt-get install gitolite3
Then, after setup is finished, you can run the command
Gitolite on Ubuntu: No admin key given
This adds the extra steps to bring in a ppa, install a new package, and reconfigure something like Gitolite3.
Replace ppa:snapy/ppa with your launchpad.
Replace gitolite3 with your package.
First, find a package you want. I generally check to see if it's in the next release; easier to upgrade later.
https://launchpad.net/~snapy/+archive/ppa
From a terminal window:
sudo add-apt-repository ppa:snapy/ppa
sudo apt-get update
sudo apt-cache gencaches
apt-cache search gitolite3
sudo apt-get install gitolite3
Then, after setup is finished, you can run the command
sudo dpkg-reconfigure gitolite and it will prompt you to provide:
- The user which gitolite will use
- The directory which that user use to store all its files (gitolite config, gitolite managed repositories, etc)
- (And the most important) the public key of the user whom will be the
first administrator in gitolite, which you may either put the public
key (just a single line starts with
ssh-rsaor path to the file which contains the public key)
Thursday, May 2, 2013
HowTo fix yum error: unpacking of archive failed on nfs4 directory.
Bug 210945 – yum update gives error: unpacking of archive failed on file /home: cpio: chown
My Jenkins yum updates on Fedora 18 have been failing for a while. Finally have a fix that works.
My /var/lib/jenkins directory is an NFS4 mount to a local server.
The first error on yum update was chown permissions. This was fixed by no_root_squash on the server.
To duplicate, from root try to do a chown in /var/lib/jenkins.
(fix no-permission problem)
On the local server:
/etc/exports
/srv *(rw,fsid=0,sync,nohide,crossmnt,insecure,no_subtree_check,no_root_squash)
/srv/jenkins *(rw,sync,nohide,insecure,no_subtree_check,no_root_squash)
The next error on chown/cpio was "invalid argument". There are some older threads about a kernel problem and null characters in uid/gid, another about nfs4 problems etc. The best fix becomes avoiding the problem :)
(fix chown invalid argument problem in yum)
/etc/rpm/macros.jenkins
At this point rpm will ignore doing chown's and yum is happy.
You might do the second step first to fix the yum problem, but the no_root_squash fix may avoid other problems if that is how you are using your mounted directory.
Some say no_root_squash is a security problem, so either lock down what servers can mount your directory (change * in /etc/exports above), or avoid the problem with netsharedpath.
My Jenkins yum updates on Fedora 18 have been failing for a while. Finally have a fix that works.
My /var/lib/jenkins directory is an NFS4 mount to a local server.
The first error on yum update was chown permissions. This was fixed by no_root_squash on the server.
To duplicate, from root try to do a chown in /var/lib/jenkins.
(fix no-permission problem)
On the local server:
/etc/exports
/srv *(rw,fsid=0,sync,nohide,crossmnt,insecure,no_subtree_check,no_root_squash)
/srv/jenkins *(rw,sync,nohide,insecure,no_subtree_check,no_root_squash)
The next error on chown/cpio was "invalid argument". There are some older threads about a kernel problem and null characters in uid/gid, another about nfs4 problems etc. The best fix becomes avoiding the problem :)
(fix chown invalid argument problem in yum)
/etc/rpm/macros.jenkins
%_netsharedpath /var/lib/jenkins
At this point rpm will ignore doing chown's and yum is happy.
You might do the second step first to fix the yum problem, but the no_root_squash fix may avoid other problems if that is how you are using your mounted directory.
Some say no_root_squash is a security problem, so either lock down what servers can mount your directory (change * in /etc/exports above), or avoid the problem with netsharedpath.
Monday, December 3, 2012
HowTo: Fix Fedora 17 FTP server on VM
vsftpd saying 500 OOPS: priv_sock_get_cmd (after update?..) (Page 1) / Networking, Server, and Protection / Arch Linux Forums
There is an obscure, non selinux, problem with Fedora vsftpd when running on a VM.
Below is a one line fix that will save you lots of debug time :)
The log file will report various selinux failures, but that is NOT the problem. The ftp sessions will get a few error messages, and be dropped from the server.
It occurs when running Fedora in a VM.
yum -y install vsftpd
vi /etc/vsftpd/vsftpd.conf
# Workaround for 500 OOPS: priv_sock_get_cmd
use_localtime=YES
seccomp_sandbox=NO
There is an obscure, non selinux, problem with Fedora vsftpd when running on a VM.
Below is a one line fix that will save you lots of debug time :)
The log file will report various selinux failures, but that is NOT the problem. The ftp sessions will get a few error messages, and be dropped from the server.
It occurs when running Fedora in a VM.
yum -y install vsftpd
vi /etc/vsftpd/vsftpd.conf
# Workaround for 500 OOPS: priv_sock_get_cmd
use_localtime=YES
seccomp_sandbox=NO
Friday, November 9, 2012
HowTo: Volume Control/Icon in Ubuntu 10.04
Volume Control/Icon is gone (Ubuntu 10.04)
The alsa sound driver, and volume control icon don't always work in 10.04.
First, You may have this, or may not, but the Volume Control needs to be running.
Click on System>Preferences>Startup Applications
Click +Add, then input:
Name: Volume Control
Command: gnome-volume-control-applet
Comment: Launch volume control applet
Next, The top bar panel needs the volume and login icon. It's done with something called Indicator.
(Someone else already asked why it's called "indicator" :) )
Right Click on Panel (Top Bar)
Click Indicator Applet
Click Add button
You may need to reboot to take effect.
The alsa sound driver, and volume control icon don't always work in 10.04.
First, You may have this, or may not, but the Volume Control needs to be running.
Click on System>Preferences>Startup Applications
Click +Add, then input:
Name: Volume Control
Command: gnome-volume-control-applet
Comment: Launch volume control applet
Next, The top bar panel needs the volume and login icon. It's done with something called Indicator.
(Someone else already asked why it's called "indicator" :) )
Right Click on Panel (Top Bar)
Click Indicator Applet
Click Add button
You may need to reboot to take effect.
Wednesday, November 7, 2012
HowTo: Restore an Ubuntu system with a bad kernel, broken network driver, unbootable system.
http://askubuntu.com/questions/28099/how-to-restore-a-system-after-accidentally-removing-all-kernels
When you lose a network driver, or have a bad kernel for some reason, this will get you going.
You are starting a working system, then setting up the essentials to chroot into your broken system. The kernel, drivers and things you need are borrowed from the working system. Then you can reinstall packages, until it's working again.
First boot from a Live Ubuntu DVD/USB. Select Try without installing. Open a terminal, and follow the instructions in the Link. Your mileage may vary, I'll try an example with sda1 boot, and sda2 root filesystem.
# Mount the root filesystem to /mnt
mount /dev/sda2 /mnt
# Check /mnt for a root filesystem (bin var etc ...)
ls /mnt
# Mount the boot partition to /mnt/boot
mount /dev/sda1 /mnt/boot
# Check /mnt/boot for kernels, if not, figure out where they are.
ls /mnt/boot
# Mount the system partitions from the Host OS.
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /dev /mnt/dev
# Chroot to your linux where everything works now...
chroot /mnt
# now you at / in your old linux.
# set the environment
mount -t devpts none /dev/pts
export HOME=/root
export LC_ALL=C
# Verify you have a working network
nslookup google.com
ping google.com
At this point you can apt-get packages and fix your system.
--- after chroot
# See what kernels you already have.
ls /boot
# See what kernels you might want.
apt-cache search linux-image
# Depending on space in /boot, install an old and new one you might like
# An old generic one in the preempt list might not appear in the regular list
apt-get install linux-image-<2 .6.32-36=".6.32-36">-generic2>
You can fix about anything wrong with a bad system with this!
When you lose a network driver, or have a bad kernel for some reason, this will get you going.
You are starting a working system, then setting up the essentials to chroot into your broken system. The kernel, drivers and things you need are borrowed from the working system. Then you can reinstall packages, until it's working again.
First boot from a Live Ubuntu DVD/USB. Select Try without installing. Open a terminal, and follow the instructions in the Link. Your mileage may vary, I'll try an example with sda1 boot, and sda2 root filesystem.
# Mount the root filesystem to /mnt
mount /dev/sda2 /mnt
# Check /mnt for a root filesystem (bin var etc ...)
ls /mnt
# Mount the boot partition to /mnt/boot
mount /dev/sda1 /mnt/boot
# Check /mnt/boot for kernels, if not, figure out where they are.
ls /mnt/boot
# Mount the system partitions from the Host OS.
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /dev /mnt/dev
# Chroot to your linux where everything works now...
chroot /mnt
# now you at / in your old linux.
# set the environment
mount -t devpts none /dev/pts
export HOME=/root
export LC_ALL=C
# Verify you have a working network
nslookup google.com
ping google.com
At this point you can apt-get packages and fix your system.
--- after chroot
# See what kernels you already have.
ls /boot
# See what kernels you might want.
apt-cache search linux-image
# Depending on space in /boot, install an old and new one you might like
# An old generic one in the preempt list might not appear in the regular list
apt-get install linux-image-<2 .6.32-36=".6.32-36">-generic2>
You can fix about anything wrong with a bad system with this!
Thursday, August 9, 2012
HowTo: Git Branch Merge with Rebasing
Rebasing Merge Commits in Git | Envato Notes
Thousands of files in a git merge...Hundreds of merge conflicts...Someone will commit before you are done...so just assume...
You will have to rebase the merge before you push it to the remote.
The obvious way, git pull --rebase, not so good...you lose your merge and start over.
This describes a Branch Merge, (merging two branches in a single git clone). Android Repo doesn't do multiple branches - I tried to find an easier way...
1) Install one of the git supported merge tools.
If the merge tool is on the path, git mergetool will automatically call it for each of your merge conflicts - very fast.
merge tool candidates: meld opendiff kdiff3 tkdiff xxdiff tortoisemerge gvimdiff diffuse ecmerge p4merge araxis bc3 emerge vimdiff
(I like meld on Linux, it works with cvs, svn, and git.)
2) Branch Merge: Merge all changes from two branches so that they match in content and point in time.
# Clone the repo containing the branches you want to merge.
git clone xxx
# Get the branch_to_merge
git checkout branch_to_merge
# Bring changes from Master to branch_to_merge.
git merge master
# Resolve any conflicts
git mergetool
# Switch back to branch master
git checkout master
# Bring changes from branch_to_merge to master
git merge branch_to_merge
# Resolve conflicts
git mergetool
# See if there are any differences between the merged branches.
git diff branch_to_merge..master
# Done, start testing...
3) Get any changes since you started merging.
# Before push, get any changes.
git checkout master
# Get new commits from the remote.
git fetch
# Move your merge "aHEAD" of the new commits.
git rebase --preserve-merges origin/master
# You may have a set of conflicts to resolve.
git mergetool
# If there are conflicts, you will be on a detached head. Must continue.
git rebase --continue
# Save the commit message when it comes up.
# At the end of rebase you will be back on master branch.
# Next get these changes to the other branch being merged.
git checkout branch_to_merge
# Get any new commits from the remote branch_to_merge.
git fetch
git rebase --preserve-merges origin/branch_to_merge
git mergetool
git rebase --continue # Upon resolving the conflicts, you will see the commit message again.
# Save it, and you are (almost) done.
# If there were commits on the branch_to_merge,
# switch back to master and merge them in (checkout, merge, mergetool).
# You are at a stable point for pushing your merge again...
# Both local branches should match, no differences.
git diff branch_to_merge..master
# Both branches should match in time.
# You should see your final merge first, at the HEAD of the tree.
git checkout master
git log --oneline --graph
git checkout branch_to_merge
git log --oneline --graph
Thousands of files in a git merge...Hundreds of merge conflicts...Someone will commit before you are done...so just assume...
You will have to rebase the merge before you push it to the remote.
The obvious way, git pull --rebase, not so good...you lose your merge and start over.
This describes a Branch Merge, (merging two branches in a single git clone). Android Repo doesn't do multiple branches - I tried to find an easier way...
1) Install one of the git supported merge tools.
If the merge tool is on the path, git mergetool will automatically call it for each of your merge conflicts - very fast.
merge tool candidates: meld opendiff kdiff3 tkdiff xxdiff tortoisemerge gvimdiff diffuse ecmerge p4merge araxis bc3 emerge vimdiff
(I like meld on Linux, it works with cvs, svn, and git.)
2) Branch Merge: Merge all changes from two branches so that they match in content and point in time.
# Clone the repo containing the branches you want to merge.
git clone xxx
# Get the branch_to_merge
git checkout branch_to_merge
# Bring changes from Master to branch_to_merge.
git merge master
# Resolve any conflicts
git mergetool
# Switch back to branch master
git checkout master
# Bring changes from branch_to_merge to master
git merge branch_to_merge
# Resolve conflicts
git mergetool
# See if there are any differences between the merged branches.
git diff branch_to_merge..master
# Done, start testing...
3) Get any changes since you started merging.
# Before push, get any changes.
git checkout master
# Get new commits from the remote.
git fetch
# Move your merge "aHEAD" of the new commits.
git rebase --preserve-merges origin/master
# You may have a set of conflicts to resolve.
git mergetool
# If there are conflicts, you will be on a detached head. Must continue.
git rebase --continue
# Save the commit message when it comes up.
# At the end of rebase you will be back on master branch.
# Next get these changes to the other branch being merged.
git checkout branch_to_merge
# Get any new commits from the remote branch_to_merge.
git fetch
git rebase --preserve-merges origin/branch_to_merge
git mergetool
git rebase --continue # Upon resolving the conflicts, you will see the commit message again.
# Save it, and you are (almost) done.
# If there were commits on the branch_to_merge,
# switch back to master and merge them in (checkout, merge, mergetool).
# You are at a stable point for pushing your merge again...
# Both local branches should match, no differences.
git diff branch_to_merge..master
# Both branches should match in time.
# You should see your final merge first, at the HEAD of the tree.
git checkout master
git log --oneline --graph
git checkout branch_to_merge
git log --oneline --graph
Wednesday, June 13, 2012
HowTo: Fix Gerrit 'Failure to submit due to path conflict'
Failure to submit due to path conflict but no real conflict. - Google Groups
Git Tools - Stashing
While there's a lot of discussion, there's no real howto to fix things up using repo using three simple commands.
Gerrit won't merge when someone is too slow to merge your changes, you've ameded your merge...A change came in before your change was merged...it happens...a lot.
repo start [branchname]
# You've made your changes and sent them to Gerrit...
repo upload
Gerrit merge fails. Here's HowTo fix it.
# Get on your repo start [branchname]
git checkout [branchname]
# Find the name of the remotebranch you are merging to with Gerrit.
git remote
[remotebranch]
# Your local changes need to be stashed for now.
git stash
# Fix your branch so you can merge with Gerrit.
git rebase[remotebranch]/master
# Reapply any local changes
git stash apply
# Amend the commit on your fixed branch.
git add .
git commit --amend
# After upload, you should see a new patch to your merge in Gerrit.
repo upload
# Get rid of stashed changes that have been merged
git stash clear
At this point, you should be able to review and merge in Gerrit, hurry up :)
Git Tools - Stashing
While there's a lot of discussion, there's no real howto to fix things up using repo using three simple commands.
Gerrit won't merge when someone is too slow to merge your changes, you've ameded your merge...A change came in before your change was merged...it happens...a lot.
repo start [branchname]
# You've made your changes and sent them to Gerrit...
repo upload
Gerrit merge fails. Here's HowTo fix it.
# Get on your repo start [branchname]
git checkout [branchname]
# Find the name of the remotebranch you are merging to with Gerrit.
git remote
[remotebranch]
# Your local changes need to be stashed for now.
git stash
# Fix your branch so you can merge with Gerrit.
git rebase
# After upload, you should see a new patch to your merge in Gerrit.
At this point, you should be able to review and merge in Gerrit, hurry up :)
Thursday, May 24, 2012
HowTo: Build GDB for ARM on Fedora 17
http://www.linuxquestions.org/questions/linux-newbie-8/no-termcap-library-found-when-building-gdb-879757/
Found a need to build a cross gdb, just one more time...It comes with a simulator...
yum install ncurses-devel texinfo gettext flex bison expat-devel sharutils dejagnu glibc-static libunwind-devel valgrind gcc-c++ gcc-gfortran readline-devel rpm-devel python-devel texinfo-tex
# Ada compiler (may not be available in cross compiler)
yum install gnat
Found a need to build a cross gdb, just one more time...It comes with a simulator...
yum install ncurses-devel texinfo gettext flex bison expat-devel sharutils dejagnu glibc-static libunwind-devel valgrind gcc-c++ gcc-gfortran readline-devel rpm-devel python-devel texinfo-tex
# Ada compiler (may not be available in cross compiler)
yum install gnat
Monday, April 9, 2012
HowTo: Ubuntu unknown user in statoverride
Tip : syntax error: unknown user ‘munin’ in statoverride file « OpenWebTech.fr
I installed virt-goodies on Ubuntu 10.04, and then nothing else would install. Even after uninstalling...A user called munin...
While the fix is easy...I could only find it in France, so here we go:
I installed virt-goodies on Ubuntu 10.04, and then nothing else would install. Even after uninstalling...A user called munin...
While the fix is easy...I could only find it in France, so here we go:
grep 'munin' /var/lib/dpkg/statoverride#You should have the following lines:#To solve the problem simply remove them with a little sed:#grep 'munin' / var / lib / dpkg / statoverride #difference difference 755 / var / lib / difference #difference difference 755 / var / www / difference #difference difference 775 / var / lib / difference / plugin-state #root munin 750 /etc/munin/plugin-conf.d #munin munin 755 / var / cache / munin / www #munin adm 750 / var / log / munin
sed -i '/munin/d' /var/lib/dpkg/statoverride
Tuesday, March 6, 2012
HowTo: Fix Vi Backspace and delete problems
Backspace and delete problems - Vim Tips Wiki
Coming into a Suse system, vi didn't do colors, and the backspace key wasn't working...Here are three obscure things found when logging into lots of different systems.
Add these lines to your ~/.vimrc file.
NOTE: Use the real backspace key for ^?
You may also need to fix the backspace key in the terminal. Put something like this in your .profile, .bashrc, whichever works.
Some systems don't add a .profile to your user account. No problem until you log in remotely (i.e. ssh), then you get a warning, can't find your profile, screen doesn't look right...
Coming into a Suse system, vi didn't do colors, and the backspace key wasn't working...Here are three obscure things found when logging into lots of different systems.
Add these lines to your ~/.vimrc file.
NOTE: Use the real backspace key for ^?
syntax on
imap ^? You may also need to fix the backspace key in the terminal. Put something like this in your .profile, .bashrc, whichever works.
stty erase '^H'
Some systems don't add a .profile to your user account. No problem until you log in remotely (i.e. ssh), then you get a warning, can't find your profile, screen doesn't look right...
ln -s ~/.bashrc ~/.profile # In case you don't have a .profile, get one this way.
Friday, March 2, 2012
HowTo: search for files excluding binary files on Linux
search for files excluding binary files - The UNIX and Linux Forums
An old problem with CVS is that you need to identify the binary files as you add them in (cvs add -kb). Otherwise, the next version will do an ASCII merge, trash the previous version, and you won't know until you try to restore an old version. Mostly happens when moving between Linux and Windows. Thanks to zazzybob, this will find ASCII files really well, and save me a bunch of work.
find . -type f -print | xargs file | grep "ASCII\|HTML\|text\|XML" | cut -d: -f1
Finds all binary files (almost) but very close...With the CVS problem, 'cvs add' the known good ASCII files, and any that are missed won't be re-added...
find . -type f -print | xargs file | grep -v "ASCII\|HTML\|text\|XML" | cut -d: -f1
An old problem with CVS is that you need to identify the binary files as you add them in (cvs add -kb). Otherwise, the next version will do an ASCII merge, trash the previous version, and you won't know until you try to restore an old version. Mostly happens when moving between Linux and Windows. Thanks to zazzybob, this will find ASCII files really well, and save me a bunch of work.
find . -type f -print | xargs file | grep "ASCII\|HTML\|text\|XML" | cut -d: -f1
Finds all binary files (almost) but very close...With the CVS problem, 'cvs add' the known good ASCII files, and any that are missed won't be re-added...
find . -type f -print | xargs file | grep -v "ASCII\|HTML\|text\|XML" | cut -d: -f1
Wednesday, February 22, 2012
HowTo: check if a file exists in a makefile (using makefile conditionals)
How to check if a file exists in a makefile - Stack Overflow
There are so many examples with redundant uses of wildcard
$(findstring., $(wildcard *.))
Use the "wildcard" function:
ifeq ($(wildcard $(HEADER_FILES)), )
# This will stop the make trying to resolve HEADER_FILES for echo :)
echo "ERROR: $(HEADER_FILES)"
else
# File exists, continue or do something else...
endif
There are so many examples with redundant uses of wildcard
$(findstring
Use the "wildcard" function:
$(wildcard *.h)
EDIT: in order to match a specific list, do$(wildcard $(HEADER_FILES))
There is no need to use $(filter ...), the wildcard function automatically filters files which don't exist.ifeq ($(wildcard $(HEADER_FILES)), )
# This will stop the make trying to resolve HEADER_FILES for echo :)
echo "ERROR: $(HEADER_FILES)"
else
# File exists, continue or do something else...
endif
Tuesday, January 31, 2012
HowTo: Free IPA on Fedora
InstallAndDeploy - Free IPA
FreeIPA
The above link is mostly correct, but a few changes for Fedora 16 and above.
systemctl disable NetworkManager.service
chkconfig network on
systemctl start network.service
install-ipa-service
# IPA isn't enabled by default (yet)
systemctl enable ipa.service
systemctl restart sshd.service
systemctl start ipa.service
# Set up your local browser with the IPA cert.
firefox http://localhost
# Define this machine as a client to the new server.
ipa-client-install
ipa-ldap-updater --test
Problem: system-config-authentication doesn't work with IPA yet.
Solution: ipa-client-install (Thank you sgallagh)
Watch for this bug 731094 to be resolved as well.
On the root server, ipa-client-install is done as part of ipa-server-install.
Problem: IPA and Dirsrv not started.
/var/log/messages: startup - The default password storage scheme SSHA could not be read or was not found in the file /etc/dirsrv/slapd-PKI-IPA/dse.ldif. It is mandatory.
On a hard shutdown, the dse.ldif files were empty.
[root@montechristo ~]# locate dse.ldif
/etc/dirsrv/slapd-PKI-IPA/dse.ldif
/etc/dirsrv/slapd-PKI-IPA/dse.ldif.bak
/etc/dirsrv/slapd-PKI-IPA/dse.ldif.startOK
/etc/dirsrv/slapd-SOLENGTECH-BIZ-TM/dse.ldif
/etc/dirsrv/slapd-SOLENGTECH-BIZ-TM/dse.ldif.bak
/etc/dirsrv/slapd-SOLENGTECH-BIZ-TM/dse.ldif.startOK
/usr/share/dirsrv/data/template-dse.ldif
Solution: Copy dse.ldif bak files, and restart services.
cp /etc/dirsrv/slapd-PKI-IPA/dse.ldif.bak /etc/dirsrv/slapd-PKI-IPA/dse.ldif
systemctl restart dirsrv@PKI-IPA.service
cp /etc/dirsrv/slapd-SOLENGTECH-BIZ-TM/dse.ldif.bak /etc/dirsrv/slapd-SOLENGTECH-BIZ-TM/dse.ldif
systemctl start dirsrv@SOLENGTECH-BIZ-TM.service
systemctl start ipa.service
FreeIPA
The above link is mostly correct, but a few changes for Fedora 16 and above.
systemctl disable NetworkManager.service
chkconfig network on
systemctl start network.service
install-ipa-service
# IPA isn't enabled by default (yet)
systemctl enable ipa.service
systemctl restart sshd.service
systemctl start ipa.service
# Set up your local browser with the IPA cert.
firefox http://localhost
# Define this machine as a client to the new server.
ipa-client-install
ipa-ldap-updater --test
Problem: system-config-authentication doesn't work with IPA yet.
Solution: ipa-client-install (Thank you sgallagh)
Watch for this bug 731094 to be resolved as well.
On the root server, ipa-client-install is done as part of ipa-server-install.
Problem: IPA and Dirsrv not started.
/var/log/messages: startup - The default password storage scheme SSHA could not be read or was not found in the file /etc/dirsrv/slapd-PKI-IPA/dse.ldif. It is mandatory.
On a hard shutdown, the dse.ldif files were empty.
[root@montechristo ~]# locate dse.ldif
/etc/dirsrv/slapd-PKI-IPA/dse.ldif
/etc/dirsrv/slapd-PKI-IPA/dse.ldif.bak
/etc/dirsrv/slapd-PKI-IPA/dse.ldif.startOK
/etc/dirsrv/slapd-SOLENGTECH-BIZ-TM/dse.ldif
/etc/dirsrv/slapd-SOLENGTECH-BIZ-TM/dse.ldif.bak
/etc/dirsrv/slapd-SOLENGTECH-BIZ-TM/dse.ldif.startOK
/usr/share/dirsrv/data/template-dse.ldif
Solution: Copy dse.ldif bak files, and restart services.
cp /etc/dirsrv/slapd-PKI-IPA/dse.ldif.bak /etc/dirsrv/slapd-PKI-IPA/dse.ldif
systemctl restart dirsrv@PKI-IPA.service
cp /etc/dirsrv/slapd-SOLENGTECH-BIZ-TM/dse.ldif.bak /etc/dirsrv/slapd-SOLENGTECH-BIZ-TM/dse.ldif
systemctl start dirsrv@SOLENGTECH-BIZ-TM.service
systemctl start ipa.service
Thursday, January 26, 2012
HowTo: Change default OS in Grub2 Fedora
Grub2 - FedoraProject
I'm having trouble with kmod-nvidia keeping up with the kernels. So I need to change the default OS more than I'd like on Fedora 16...
Note, the Grub2 rules for Ubuntu are different than Fedora, and conflict.
Whenever you change the drives or OS you need to generate a new configuration file.
Found linux image: /boot/vmlinuz-3.2.3-2.fc16.x86_64
Found initrd image: /boot/initramfs-3.2.3-2.fc16.x86_64.img
Found linux image: /boot/vmlinuz-3.1.9-1.fc16.x86_64
Found initrd image: /boot/initramfs-3.1.9-1.fc16.x86_64.img
Found Windows NT/2000/XP (loader) on /dev/sdc1
done
To list the found OS's:
grep menuentry /boot/grub2/grub.cfg
menuentry 'Fedora Linux, with Linux 3.2.3-2.fc16.x86_64' --class fedora --class gnu-linux --class gnu --class os {
menuentry 'Fedora Linux, with Linux 3.1.9-1.fc16.x86_64' --class fedora --class gnu-linux --class gnu --class os {
menuentry "Windows NT/2000/XP (loader) (on /dev/sdc1)" --class windows --class os {
To check, by name, the saved entry:
grub2-editenv list
saved_entry=Fedora Linux, with Linux 3.1.9-1.fc16.x86_64
If you have not changed disk drives or partitions, start here
To boot the previous OS (i.e. Linux 3.1.9-1):
I'm having trouble with kmod-nvidia keeping up with the kernels. So I need to change the default OS more than I'd like on Fedora 16...
Note, the Grub2 rules for Ubuntu are different than Fedora, and conflict.
Whenever you change the drives or OS you need to generate a new configuration file.
grub2-mkconfig -o /boot/grub2/grub.cfg
It will display a list of OS files found, Windows and Linux.
Found linux image: /boot/vmlinuz-3.2.3-2.fc16.x86_64
Found initrd image: /boot/initramfs-3.2.3-2.fc16.x86_64.img
Found linux image: /boot/vmlinuz-3.1.9-1.fc16.x86_64
Found initrd image: /boot/initramfs-3.1.9-1.fc16.x86_64.img
Found Windows NT/2000/XP (loader) on /dev/sdc1
done
To list the found OS's:
grep menuentry /boot/grub2/grub.cfg
menuentry 'Fedora Linux, with Linux 3.2.3-2.fc16.x86_64' --class fedora --class gnu-linux --class gnu --class os {
menuentry 'Fedora Linux, with Linux 3.1.9-1.fc16.x86_64' --class fedora --class gnu-linux --class gnu --class os {
menuentry "Windows NT/2000/XP (loader) (on /dev/sdc1)" --class windows --class os {
To check, by name, the saved entry:
grub2-editenv list
saved_entry=Fedora Linux, with Linux 3.1.9-1.fc16.x86_64
If you have not changed disk drives or partitions, start here
To boot the previous OS (i.e. Linux 3.1.9-1):
grub2-set-default 1
To boot the usual OS: (once everything is working again)
grub2-set-default 0
T
</pre> with the title of the newly installed Fedora's entry. From that point on you can change the default by calling <pre>grub2-set-default <title or number></pre> or view it by running <pre>grub2-editenv list</pre> <p>To do that, you'll need the list of possible menu entries, which you can find with </p> <pre>grep menuentry /boot/grub2/grub.cfg<br /><br /><br /></pre><br />
Wednesday, January 11, 2012
HowTo: Install GNOME 3 Shell Extensions
Five must have Gnome shell extensions for Fedora 15 « Justin Stories
Earlier, I've blogged on the difficult to install weather extension (Rick Foos HowTo Blog: Gnome Shell Weather Extension ~ Web ...).
So how do you install GNOME 3 Shell Extensions?
First, Remember - Must Reset Desktop when Changing Shell Extensions
Alt-[F2], r
...Ubuntu is mostly the same with apt-get instead of yum...After you install the extensions, exactly the same...
# Install GUI to manage shell extensions.
yum -y install gnome-tweak-tool
# What are the available shell extensions?
yum list gnome-shell-extension-*
A list follows with some possibilities...
yum install gnome-shell-extension-*
# Enable/Disable Shell Extensions from a gui.
gnome-tweak-tool

While many of them may not do what you expect, some are good.
Some extensions will need settings to be customized.
# Find where the settings for a shell extension are located.
# NOTE: Extensions may or may not have 'extension' in their schema name.
gsettings list-schemas
# Find the current settings, for an extension.
# if you have a keyword to grep, you can use that or copy one of the schemas from the list.
gsettings list-recursively $(gsettings list-schemas | grep weather)
org.gnome.shell.extensions.weather city ''
org.gnome.shell.extensions.weather position-in-panel 'center'
org.gnome.shell.extensions.weather show-comment-in-panel true
org.gnome.shell.extensions.weather show-text-in-panel true
org.gnome.shell.extensions.weather translate-condition true
org.gnome.shell.extensions.weather unit 'fahrenheit'
org.gnome.shell.extensions.weather use-symbolic-icons false
org.gnome.shell.extensions.weather woeid 'USTX0058'
# Find out what the valid settings are...
# Most useful for enums, otherwise just reports the data type and none exactly say what will happen...
gsettings range org.gnome.shell.extensions.weather unit
enum
'celsius'
'fahrenheit'
# Change a setting
gsettings set org.gnome.shell.extensions.weather unit 'fahrenheit'
Now you are an unintended expert in GNOME 3 shell extensions...This is a step backward, there was a GUI to add shell extensions in GNOME 2...I had no intention of becoming a shell extension expert...So I'm an unintended expert...
- Rick
Earlier, I've blogged on the difficult to install weather extension (Rick Foos HowTo Blog: Gnome Shell Weather Extension ~ Web ...).
So how do you install GNOME 3 Shell Extensions?
First, Remember - Must Reset Desktop when Changing Shell Extensions
Alt-[F2], r
...Ubuntu is mostly the same with apt-get instead of yum...After you install the extensions, exactly the same...
# Install GUI to manage shell extensions.
yum -y install gnome-tweak-tool
# What are the available shell extensions?
yum list gnome-shell-extension-*
A list follows with some possibilities...
Installed Packages# If you're not one to mess around, install them all...You can always remove them later...
gnome-shell-extension-common.noarch 3.2.3-1.fc16 @updates
gnome-shell-extension-systemMonitor.noarch 3.2.3-1.fc16 @updates
Available Packages
gnome-shell-extension-alternate-tab.noarch 3.2.3-1.fc16 updates
gnome-shell-extension-alternative-status-menu.noarch
3.2.3-1.fc16 updates
gnome-shell-extension-apps-menu.noarch 3.2.3-1.fc16 updates
gnome-shell-extension-auto-move-windows.noarch 3.2.3-1.fc16 updates
gnome-shell-extension-cpu-temperature.noarch 0-0.3.git1f471c7.fc16 updates
gnome-shell-extension-dock.noarch 3.2.3-1.fc16 updates
gnome-shell-extension-drive-menu.noarch 3.2.3-1.fc16 updates
gnome-shell-extension-gpaste.noarch 2.1-1.fc16 updates
gnome-shell-extension-icon-manager.noarch 0-0.4.gitc34779c.fc16 updates
gnome-shell-extension-mediaplayers.noarch 0-0.1.git259f96e.fc16 fedora
gnome-shell-extension-native-window-placement.noarch
3.2.3-1.fc16 updates
gnome-shell-extension-noim.noarch 1.0-1.fc16 fedora
gnome-shell-extension-noripple.noarch 1.0-1.fc16 fedora
gnome-shell-extension-pidgin.x86_64 0-0.5.git80d4ea4b59.fc16
fedora
gnome-shell-extension-places-menu.noarch 3.2.3-1.fc16 updates
gnome-shell-extension-pomodoro.noarch 0-0.2.git13030cd.fc16 fedora
gnome-shell-extension-presentation-mode.noarch 0-0.3.gitbe7e0ae.fc16 updates
gnome-shell-extension-remove-accessibility-icon.noarch
20111008-1.fc16 updates
gnome-shell-extension-remove-bluetooth-icon.noarch
0.2-1.fc16 updates
gnome-shell-extension-remove-volume-icon.noarch 0.3-1.fc16 updates
gnome-shell-extension-righthotcorner.noarch 1.0-1.fc16 fedora
gnome-shell-extension-theme-selector.noarch 0.9-3.fc16 fedora
gnome-shell-extension-user-theme.noarch 3.2.3-1.fc16 updates
gnome-shell-extension-windowsNavigator.noarch 3.2.3-1.fc16 updates
gnome-shell-extension-workspace-indicator.noarch 3.2.3-1.fc16 updates
gnome-shell-extension-workspacesmenu.noarch 0-1.fc16 fedora
gnome-shell-extension-xrandr-indicator.noarch 3.2.3-1.fc16 updates
yum install gnome-shell-extension-*
# Enable/Disable Shell Extensions from a gui.
gnome-tweak-tool
While many of them may not do what you expect, some are good.
Some extensions will need settings to be customized.
# Find where the settings for a shell extension are located.
# NOTE: Extensions may or may not have 'extension' in their schema name.
gsettings list-schemas
# Find the current settings, for an extension.
# if you have a keyword to grep, you can use that or copy one of the schemas from the list.
gsettings list-recursively $(gsettings list-schemas | grep weather)
org.gnome.shell.extensions.weather city ''
org.gnome.shell.extensions.weather position-in-panel 'center'
org.gnome.shell.extensions.weather show-comment-in-panel true
org.gnome.shell.extensions.weather show-text-in-panel true
org.gnome.shell.extensions.weather translate-condition true
org.gnome.shell.extensions.weather unit 'fahrenheit'
org.gnome.shell.extensions.weather use-symbolic-icons false
org.gnome.shell.extensions.weather woeid 'USTX0058'
# Find out what the valid settings are...
# Most useful for enums, otherwise just reports the data type and none exactly say what will happen...
gsettings range org.gnome.shell.extensions.weather unit
enum
'celsius'
'fahrenheit'
# Change a setting
gsettings set org.gnome.shell.extensions.weather unit 'fahrenheit'
Now you are an unintended expert in GNOME 3 shell extensions...This is a step backward, there was a GUI to add shell extensions in GNOME 2...I had no intention of becoming a shell extension expert...So I'm an unintended expert...
- Rick
Monday, December 26, 2011
HowTo: Fix Windows 7 Showing Only "Other User" and Last Logged On User
Logon Screen - Fix Showing Only "Other User" and Last Logged On User - Windows 7 Forums
There are several HowTo's on this. You don't have to delete all accounta, re-install Windows, etc...
This won't work if you are on a Domain.
This works if you have a bad profile record in your list of accounts. In my case, adding/deleting an account caused one of these.
Regedit
Find:
Delete any in the list that do not have a ProfilesImagePath record.
If that is not the case, refer to the HowTo for a few more examples.
There are several HowTo's on this. You don't have to delete all accounta, re-install Windows, etc...
This won't work if you are on a Domain.
This works if you have a bad profile record in your list of accounts. In my case, adding/deleting an account caused one of these.
Regedit
Find:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
Delete any in the list that do not have a ProfilesImagePath record.
If that is not the case, refer to the HowTo for a few more examples.
Subscribe to:
Posts (Atom)