dimanche 1 février 2015

CentOS 6.5 server randomly hanging on login


Our research group has a server with 16 processors that we run simulations on. The person who set up the server graduated last year, so now its up to us to troubleshoot it.


My question is this: I'll try to ssh into the server



ssh name@100.10.100.100


At which point I'll usually be prompted for a password and then it logs me in.


Sometimes though, when I try to ssh in it just hangs indefinitely after I press enter and does not allow me to enter my password and access the server. There are no error messages, it just hangs. This issue occurs for all users, not just me.


What should I do next? Thanks in advance for any help.



Printer sharing using Fedora


I have to PC and netbook runs on fedora



  • PC - Fedora 21 (Workstation)

  • Netbook - Fedora LXDE


Both of these computers are connected to the same network (PC wired and netbook wireless)


My HP Deskjet 1010 printer is connected to the PC via a USB cable.


I want to enable printing over network for my netbook.



Providing access permissions to 2 git repositories inside single git instance


I have two git repositories in one single git instance and need one set of users to access one repository and another set of users to access second repository.


How can I create a group, and add users to it and provide them permissions to access the git repository.



rpm -Uvh - How to replace modified config file


The question is a duplicate from Stackoverflow site


I upgrade rpm package with rpm -Uvh command.


Original and new configuration file is the same, but current file on disk has been changed.


This situation described in Original file = X, Current file = Y, New file = X


Due to delivered fixes in a new rpm file I want to overwrite this configuration file anyway. Is there way to do it ?


The configuration file appear in %config section of rpm spec.


--replacefiles, --replacepkgs options don't help here.


Thanks



how to find out if kernel or udev created a device node?


Is there any way I can tell if the origin/creater of an device node has been udev or the kernel itself?


In the specific case of mine I have two webcams. Nodes created to them are /dev/video0 and /dev/video1. Unfortunatelly it is not a constant assignment. Now I though that is exactly the case to use udev for but when I create an udev rule it seems to me that the video0 and video1 nodes are already created prior to udev being able to assign a more constant node like /dev/videoLogitech.


I hope to receive as an answer some suggestion regarding which log-file or which command my help me to find out about what happens here



How to generate grub.cfg for different disk?


I have 2 disks:

1-st disk contains base operating system (/dev/sda with many partitions and OSes)

2-nd disc should be setup (/dev/sdb1=/boot,/dev/sdb2=/)


I have grub2 package installed in the base operating system. I want to create grub.config file for the operating systems on the second disk (without installing grub2 package in chroot on second disk, because this disk is for different architecture. I just want to regenerate config)


if I use



mkdir -p /mnt/gentoo
mount /dev/sdb2 /mnt/gentoo
mount /dev/sdb1 /mnt/gentoo/boot
grub-mkconfig -o /mnt/gentoo/boot/grub/grub.cfg


then there is no way to specify /dev/sdb as a base disk for enumerating installed OSes for grub-mkconfig


If disk /dev/sda contains N partitions, then grub-mkconfig creates ~ N * number_of_kernels menu entries. But I want make it creating entries for partitions of disk /dev/sdb (which have one partition /dev/sdb2 with one installed OS).


I also tried grub-customizer utility, because it have disk selection in parameters dialog. But looks like grub-customizer uses all utilities and files which are relative to the choosen disk, and I don't have grub2 on /dev/sdb installed (see note above about different architecture)


Someone told me that it is possible to do this by temporary correcting fstab of base system, but I doubt this will help.


So, how to generate grub.conf for different disk? (without writing it by hands with texteditor)


UPD: feature request - http://ift.tt/15N34GA



List all udev rules (e.g. for a device)?


I want to know how I can list all udev rules.


I know that in they can be potentially stored as lines (one line = one rule) in *.rules files in these directories



/etc/udev/rules.d
/lib/udev/rules.d
/run/udev/rules.d
/var/run/udev/rules.d


Therefore I though I can find all rules by simple concating all the *.rules files in those directories. This seems not to be working (because some rules are executed which I cannot find anyware as rules in these directories).


At best I thought that there is a command to the udevadm interface which will let me print out all the rules that udev currently has.