mardi 30 décembre 2014

Recover dokuwiki directory in debian


I accidentally deleted all the content of the dokuwiki directory and want to restore it not with a Linux (Debian) command. In the directory of dokuwiki far as i know mainly .txt files are located. How can I restore them?


I took a look to the scalpel and foremost but i don't know how to handle the .txt files in the configuration.


Thank you in advance for the help.


Regards couda



Problems booting Kali Linux 1.0.9a 64 bit on Macbook Pro


I have a mid 2009 Macbook Pro that I am trying to dual boot OS X and Kali Linux on. I replaced my optic drive with my old HDD and replaced my HDD with an SSD. OS X and my apps are running off of the SSD. My HDD is almost out of space, but my SSD has about 60GB free. I have installed rEFInd and I am using it to boot into Kali Linux by DVD. I am able to have it start to boot through the first Live option, but when it reaches the following line, it stops executing:


nouvea [DRM] mm: using CRYPT for buffer copies


I have partitioned my hard drive, formatted for MS-DOS, and I have tried re-downloading the .iso and burning it to another DVD. Neither method has worked. Any help would be greatly appreciated.



Warn about password expiration without forcing change


It's pretty simple. I would like to figure out what combination of changes in /etc/login.defs and/or /etc/pam.d/system-auth-ac I would need to perform to allow the following behavior:




  • I want a user's password to be valid for 60 days.




  • After 60 days, the system needs to yell at the user when they log in, telling them they need to change their password ASAP.




  • The system must not impede the user's access to the system.




  • This must apply to existing users (non-system accounts, UID >=500) as well as any newly-created users.




Rationale: Limited users will not be managing the system account passwords, only system admin(s). Therefore, users should not have their access to the system impeded because the admin missed a password change. The number of accounts is rather small (maybe 9 or 10), but we're all human and we forget to do stuff from time to time.


I'm not sure if login.defs or PAM offer this. The documentation leads me to believe that you can either have the system force the user to change their password when it expires, or you can have the password not age at all. A third option is to have the password age limit set to some huge amount, like 9,999 days, and then start warning the user that their password will expire in 9,936 days, but that's not really what I need either. I've done other kinds of PAM configuration, so it's not my first trip around the block. I'm just stuck on this problem.


So, can this be done with PAM/login.defs, or do I need another utility that can take their place?



seek function in unix


I try to understand the seek(2) function from Unix version 6.


This example:



seek(0,0,2)


So the first argument is the file descriptor. And 0 would be the standard input. The second argument is the offset, which is 0. And the third argument tells us according to man page "the pointer is set to the size of the file plus offset."


But why would you do this? Why would you point after the file?


The line is from the source code.



Error getting the string between two patterns


I want to get a string between two patterns. The pattern is the first environment <p> </p> in an html file.



<p>Sorcery,
R (1)
</p>
<p class="ctext"><b>As an additional cost to cast Goblin Grenade, sacrifice a Goblin.<br><br>Goblin Grenade deals 5 damage to target creature or player.</b></p>


<p><i>Don't underestimate the aerodynamic qualities of the common goblin.</i></p>
<p>Illus. Kev Walker</p>


That environment is the first of the file so I discard everything matched until the <p> and I want to delete everything after the </p>.



name="goblin grenade"
wget -O- http://magiccards.info/query?q="$name" | grep -oP '<p>\K[^<]+'


I don't know why it doesn't work properly. I get



Sorcery,
Illus. Kev Walker


How to influence the assignment of subordinate UIDs/GIDs when creating user accounts?


To my knowledge the subordinate UIDs and GIDs are assigned to accounts in such a manner that they form a contiguous range.


The range starts at 100000 by default and probably stretches to the theoretical maximum value for a UID/GID (even though I haven't found a way to query this from the shell, /etc/login.defs only lists the values allowed for the tools).


Now, it'd be a lot more convenient for me as a human if the ranges would start at a multiple of 100000, i.e. n*100000 with n being a positive integer (n>0), instead of 100000+n*65536. This way I'd be able to see immediately which file is owned by which host user.


Is there a way to influence the assignment of subordinate UIDs/GIDs in some way in modern enough shadow-utils to achieve a more human-readable assignment?


If not, is it alright to simply overwrite the files /etc/subuid and /etc/subgid with conforming data to get what I want?



How to install PyQT4 on FreeBSD?


I need to run an application that uses PyQT4 on FreeBSD 10. I searched ports, but could not identify any package for PYQT4. Which package will install this?