How to extract *.xz files ?
If you are running Ubuntu, you should have the xz-utils installed by default. I am running Ubuntu 10.04, and to extract .xz files, I use the following command:
if it is not installed , install by giving the command:- sudo apt-get install xz-utils
xz -d path/to/file.xz
This will extract the file to the current directory.
Sunday, April 15, 2012
Monday, April 2, 2012
Wednesday, February 22, 2012
Tuesday, February 14, 2012
allows access to the system by the user root only
PAM NOLOGIN:-
* allows access to the system by the user root only
* obviates the need to shut down services
* displays the contents of /etc/nologin file
sample content of this file :-
CURRENTLY WE ARE UNDERGOING SYSTEM MAINTENANCE, EXPECT US BACK IN 1600 HOURS
add the following directive
auth required pam_nologin.so to the relevant pam file.
(ex:- for ssh /etc/pam.d/sshd file)
[root@BACKUP-SERVER ~]# find / -name pam_nologin.so
/lib64/security/pam_nologin.so
/lib/security/pam_nologin.so
* allows access to the system by the user root only
* obviates the need to shut down services
* displays the contents of /etc/nologin file
sample content of this file :-
CURRENTLY WE ARE UNDERGOING SYSTEM MAINTENANCE, EXPECT US BACK IN 1600 HOURS
add the following directive
auth required pam_nologin.so to the relevant pam file.
(ex:- for ssh /etc/pam.d/sshd file)
[root@BACKUP-SERVER ~]# find / -name pam_nologin.so
/lib64/security/pam_nologin.so
/lib/security/pam_nologin.so
Monday, February 13, 2012
How will you implement account lockout policy in linux?
How will you implement account lockout policy in linux?
soln:-
PAM_TALLY
* ability to tally failed login attempts and take actions
* Denies user access to the system based on no: of failed login attempts
* This feature / module not enabled by default
* uses /var/log/faillog - logs failed logins
* manipulate failed login counters
which pam_tally ?
/usr/sbin/pam_tally (i.e it is a root enabled utility)
* pam_tally --user username :- displays the count of the username
resetting a failed login counter:-
pam_tally --reset=n --user=username
Add the following line to /etc/pam.d/common-auth
auth required pam_tally.so deny=3 unlock_time=1800
NB:- tested in centos -5.5
for ubuntu systems see:- http://blog.bodhizazen.net/linux/ubuntu-how-to-faillog/
soln:-
PAM_TALLY
* ability to tally failed login attempts and take actions
* Denies user access to the system based on no: of failed login attempts
* This feature / module not enabled by default
* uses /var/log/faillog - logs failed logins
* manipulate failed login counters
which pam_tally ?
/usr/sbin/pam_tally (i.e it is a root enabled utility)
* pam_tally --user username :- displays the count of the username
resetting a failed login counter:-
pam_tally --reset=n --user=username
Add the following line to /etc/pam.d/common-auth
auth required pam_tally.so deny=3 unlock_time=1800
NB:- tested in centos -5.5
for ubuntu systems see:- http://blog.bodhizazen.net/linux/ubuntu-how-to-faillog/
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora
This is one of the worse errors i came across so far, whenever i tried to update my fedora 12 through yum there was an error saying
[Errno 14] PYCURL ERROR 7 – “”
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again
there were tons of solutions available on googling, but most of them were useless. This is how i worked out the problem
first of all if you are using proxy server,configure your yum.conf file so that you can link to proxy
after that try the following commands
#yum clean all
#yum clean metadata
Now try to update again using yum, even if the same error is coming... it is probably due to python .
Since the python does not handle https proxy well, change all the https present in *.repo files in /etc/yum.repos.d/ to http
Here’s the way to do it… edit your repository files /etc/yum.repos.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo by commenting all the lines starting with term mirrorlist and uncommenting all the lines starting with term baseurl.
Now append the following to your /etc/hosts file
80.239.156.215 mirrors.fedoraproject.org
213.129.242.84 mirrors.rpmfusion.org
This worked for me and hopefully it must work for you also. If you want a copy of all *.repos file then ask in comment.
see:- http://rishabhsays.wordpress.com/2010/01/24/error-cannot-retrieve-repository-metadata-repomd-xml-for-repository-fedora/
[Errno 14] PYCURL ERROR 7 – “”
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again
there were tons of solutions available on googling, but most of them were useless. This is how i worked out the problem
first of all if you are using proxy server,configure your yum.conf file so that you can link to proxy
after that try the following commands
#yum clean all
#yum clean metadata
Now try to update again using yum, even if the same error is coming... it is probably due to python .
Since the python does not handle https proxy well, change all the https present in *.repo files in /etc/yum.repos.d/ to http
Here’s the way to do it… edit your repository files /etc/yum.repos.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo by commenting all the lines starting with term mirrorlist and uncommenting all the lines starting with term baseurl.
Now append the following to your /etc/hosts file
80.239.156.215 mirrors.fedoraproject.org
213.129.242.84 mirrors.rpmfusion.org
This worked for me and hopefully it must work for you also. If you want a copy of all *.repos file then ask in comment.
see:- http://rishabhsays.wordpress.com/2010/01/24/error-cannot-retrieve-repository-metadata-repomd-xml-for-repository-fedora/
Subscribe to:
Posts (Atom)


