dimanche 30 novembre 2014

How to upload a file from a Unix server to a network drive using Putty?


I want to upload a file from a Unix Server to a network mapped drive using Putty. Now the Network Mapped drive (in Windows) holds an address something like \......... and is named MyDrive I have been trying the following without any success



ftp <<Network Drive Address>>


but it says invalid address



user $USER $PASS
and then put ...


Is this the way should I do it ? Or am I missing something important down here ? Please explain. Any help is much appreciated.



Who would use this information to develop better support for hybrid graphics?


I have a laptop with hybrid graphics and I'm so frustrated that linux doesn't fully support it without any intervention from my side, just like any other Windows machine would normally do.


So I landed on this page which instructed me to run some scripts to gather information about my system and then led to this page which held basically the same information and then led me to this page which instructed me to gather some more information.


I package these information in an archive. But sadly, after a discussion with one of the admins of the original page, he clearly stated that there was no much recent effort done to support my brand of graphics card (i.e. Radeon)


So I'm not sure who in the Linux world could make use of the information I gathered to provide better support for HybridGraphics on Linux. I doubt it would be the Linux kernel mailing list. So who would it be if any ?



How to enable second SIM slot in ALIX6F2 and how to switch 3G to it from the 1st one?


I am trying to enable the SIM slot under the RF card but with no success whatsoever. I'm using Voyage 0.8 (a stripped off Debian distribution) as an operating system. A bit of searching landed me to the following steps:



echo 1 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/GPIO1/direction
echo 1 > /sys/class/gpio/GPIO1/value


But when I do ' echo 1 > /sys/class/gpio/export ' , it says "invalid argument".


Also i cannot find anything under /sys/class/gpio except export and unexport. I learnt that there should be something like GPIO1 etc.


I have the feeling that the driver itself in not installed or may need to be reconfigured. Please tell me from where to get the GPIO driver??


Since ALIX6F2 lacks a buzzer, I unloaded the pcspkr module too but with no success.


Thanks in advance. I'm kind of stuck on it from past few days so any help will be much much appreciated. :) :)



What exactly `systemctl --user enable SERVICE` means?


I expected systemctl --user enable SERVICE to start the service on login, which is not happening. Then what is it supposed to mean?



Not showing Huawei info in lsusb opuput


~ # lsusb Bus 001 Device 001: ID 1d6b:0002 Bus 002 Device 001: ID 1d6b:0001 Bus 001 Device 002: ID 12d1:1446



How to check if file has a BOM in utf-8 text


How can I check if a utf-8 text file have a BOM from command line?


file command shows me UTF-8 Unicode text.


But I don't know it means there is no BOM in the file.


I'm using Ubuntu 12.04.



sudoers file and passwd only for selected gropu


I have 3 users in "production" group: John, Steve and Bob. In "sales" group are: Sam and Jack.


Now, I would like to give John permition to change passwords of all users but only in "production" group, so he will be unable to make any changes to Sam and Jack.


In my /etc/sudoers file I have alias for all users in "production" group:



User_Alias PRODUCTION = %production


And the problem is I have no idea how to write this:



john ALL =(root) /usr/bin/passwd steve, (root) /usr/bin/passwd bob, (root) /usr/bin/passwd jack


... using my PRODUCTION alias, so if there is someone new added to this group, there will be no need to add him manually to sudoers file too.


I've tried something like this in many variations:



john ALL =(root) /usr/bin/passwd PRODUCTION


but it doesn't work and at this moment I have no more ideas.


I will appreciate any clues, thanks a lot!



nohup, screen and tmux not working when closing connection on yocto linux (intel edison)


I have an Intel Edison with Yocto Linux and standard configurations. It had nohup pre-installed and I managed to install both screen and tmux (by compiling them from sources). Now, I would like to run some process and keep it working when I disconnect. I tried the following:



  • Running a program with screen, detaching, logging out, logging in, running screen -r

  • Running a program with tmux, detaching, logging out, logging in, running tmux attach

  • Running that program with nohup python myscript.py &


When using screen and tmux, I succesfully manage to resume my sessions if I don't disconnect. However, when I disconnect both screen and tmux say that there is no session / screen to be resumed. When running with nohup, logging out and back in causes my process to be killed (it doesn't show up when running top).


What could be going on? I really an not understanding this.


Thank you!



is this a keyboard hardware limitation?


I have remapped Caps_Lock to Ctrl_L on an ancient mechanical keyboard.


It is still impossible to use the caps lock key to produce key combinations like C-e.


xev shows the following sequences are received when holding caps lock and pressing the e key:



KeyRelease event, serial 34, synthetic NO, window 0x2800001,
root 0x250, subw 0x0, time 125662314, (4,-16), root:(5,382),
state 0x4, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XKeysymToKeycode returns keycode: 37
XLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x2800001,
root 0x250, subw 0x0, time 125663274, (4,-16), root:(5,382),
state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
XLookupString gives 1 bytes: (65) "e"
XmbLookupString gives 1 bytes: (65) "e"
XFilterEvent returns: False


Only when holding the actual left Ctrl key and pressing e is it producing the expected ^E control sequence:



KeyPress event, serial 34, synthetic NO, window 0x2800001,
root 0x250, subw 0x0, time 125666946, (4,-16), root:(5,382),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x2800001,
root 0x250, subw 0x0, time 125669530, (4,-16), root:(5,382),
state 0x4, keycode 26 (keysym 0x65, e), same_screen YES,
XLookupString gives 1 bytes: (05) "^E"
XmbLookupString gives 1 bytes: (05) "^E"
XFilterEvent returns: False


As it's shown that Caps_Lock's XKeysymToKeycode returns keycode: 37 I would like to know if it is possible to handle this in the event that it is a hardware limitation.


The keyboard is from an Apple IIcI, a computer was released in 1989.


What do you think could be causing this?



apt itself update and download packages


I have Debian SID with the following APT configuration:



APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";


I remove apt and aptitude scripts from /etc/cron.daily.

But apt itself do update and download operation, and When i use apt-get dist-upgrade i prevent to :



Need to get 0 B/24.0 MB of archives.


It means apt itself updates and downloads upgradble packages.

Question is: How can i disable this feature?



What does "dd" stand for?


What does dd stand for? I've always referred to it colloquially as "Disk Destroyer", but what are the "official" words that make up the acronym/command?


According to this link and this link it could be one of the following:



  1. It used to stand for 'copy and convert' and was renamed 'dd' because 'cc' was already in use for the C compiler.

  2. It is a remnant of 'Job Control Language' program conversion into the 'Job Entry System'.

  3. It means 'data destruction'



.bashrc script not being run from .bash_profile upon startup?


I have some system defaults that I want run each time I startup a new shell (This is for Mac OS X).


To have these defaults set in a startup shell, and a sub shell, I was told to create a .bashrc file, and then have that run from .bash_profile. So, I made (in my ~ (User/Root) directory) a .bashrc file that has a simple command:



alias ll='ls -lahG'
Echo "Hello World"


In my .bash_profile file I have the following:



if [ -f ~./bashrc ]; then
source ~/.bashrc
fi


For some reason, when I start up a new shell, "hello world" is not echoed and the alias does not work. However, if I type bash to begin a new "subshell" (if that is what they are called), "Hello World" does print, and the aliases work.


Any idea why my .bash_profile is either not running, or why the .bashrc file is not?


Thanks



shared object file open error with "sudo command" but NOT with "sudo bash" then same command?


I'm having a hard time getting my brain wrapped around how LD_LIBRARY_PATH is handled differently for the following three cases:



  • run as a regular user

  • run via "sudo command"

  • run via "sudo bash" followed in the root shell by "command"


My particular problem is that a binary I'm trying to run (called dc_full) requires sudo access, but throws the following error when run as "sudo command":



ljw@test$ sudo ./dc_full
./dc_full: error while loading shared libraries: libthrift-0.9.1.so: cannot open shared object file: No such file or directory

ljw@test$ sudo bash
root@ljw-vm1:~/test# ./dc_full
.
...<works fine here!>
.


I have the following line in both /etc/bash.bashrc and in ~/.bashrc for user ljw.



root@ljw-vm1:~# grep LD_LIBRARY ~/.bashrc
export LD_LIBRARY_PATH=$http://LD_LIBRARY_PATH:/usr/local/lib

root@ljw-vm1:~# grep LD_LIBRARY /etc/bash.bashrc
export LD_LIBRARY_PATH=$http://LD_LIBRARY_PATH:/usr/local/lib


I would expect that this covers both the sudo and sudo-bash cases, one covers the user shell and one covers the "root" shell. But clearly this is not happening.


I found references to ldd, which gives me a big hint that it's not working, but not quite WHY...



root@ljw-vm1:~/dc_full# ldd ./dc_full | grep thrift
libthrift-0.9.1.so => /usr/local/lib/libthrift-0.9.1.so (0x00007eff19e7c000)

ljw@ljw-vm1:~/dc_full$ ldd ./dc_full | grep thrift
libthrift-0.9.1.so => /usr/local/lib/libthrift-0.9.1.so (0x00007f8340cc5000)

ljw@ljw-vm1:~/dc_full$ sudo ldd ./dc_full | grep thrift
[sudo] password for ljw:
libthrift-0.9.1.so => not found


SO the question, in summary, is what does "sudo command" use to get the LD_LIBRARY_PATH setting if it's not the user bashrc NOR the system default bashrc???



command to log out of LXDE directly


To log out of LXDE, I can click on the "Start" menu, click "Logout" and when the menu pops up click on "logout" again.


Or I can type lxde-logout in my terminal and when the menu opens, click on "logout".


Both options are too cumbersome. I need a command which will log me out immediately, without menu, or without other options.


Is this possible ?


I am using LXDE on Debian Wheezy



Checking and Killing processes of a user before deleting


I am working on a script to delete users from text file. However, before deleting, I wanna check if any process by a user is running and if running then kill all the processes and delete. Here's how, I'm doing this..



if
#user doesn't exists then print user not exist
else
pids = `ps U "$name" -o pid | head -n -1`
if [ -n "$pids" ]
then
for pid in $pids
do
sudo kill -KILL $pid
done
fi


sudo userdel

$name -r -f
echo


echo "The user - $name - has been deleted!"
echo
fi
done < "$fname" # double-quote fname
echo


So, basically its a loop to delete users and in that an if statement to make sure no process is being run by a user and if its being run then force close processes and delete user.


However, Its not working and it says pids: command not found.. Any solution, how to fix it? I'd appreciate your help, Regards



using gpg-agent between different sessions


I am trying to set up gpg-agent


When I log in to my machine (via SSH) and invoke gpg, it asks for password every time (it does not start gpg-agent automatically).


When I start gpg-agent manually using:



eval "$(gpg-agent --daemon)"


then next invocation of gpg actually launches the agent, and after typing my password once, I can then use gpg without password. Also, I see a socket has been created in $HOME/.gnupg/S.gpg-agent=


When I log out and log in again (ssh), I see the socket still exists in $HOME/.gnupg/S.gpg-agent= and ps shows that the agent is running, but every invocation of gpg asks for password, as if there was no agent.


I have added this to my .bashrc:



GPG_TTY=$(tty)
export GPG_TTY


but that does not seem to help


I find the behaviour of gpg-agent very confusing. I am familiar with ssh-agent and that behaves straightforward and understandable.


How can I use gpg-agent same way as I would use ssh-agent ?


For comparison, this is how ssh-agent behaves:


After I boot my machine and login for the first time, I launch ssh-add manually and type my pass phrase once.


Then, every time I log in to my machine (X, console, ssh, ...) I can use the agent (I don't need to type my password again). This is done by adding following line to .bashrc:



export SSH_AUTH_SOCK="$(find /tmp/ssh-*/agent.* -uid $(id -u) -type s -print -quit 2>/dev/null)"


Rename files with even numbers


I have a collection of images which are scanned pages of books. They total some 10,000 pages. The books were printed bilingually, with the text and translation on facing pages. The translation has been discarded, and there is only the original text pages, which are the even numbered pages.


I need the file names to include the correct page number, whereas currently they are in a simple sequence. Happy to use rename or similar.


To make it explicit, we currently have file numbering of the form:


1-001.png, 1-002.png, 1-003.png ...


Where the first number 1 is the volume number; this is to remain unchanged. The second number is the page number, and this needs to be changed thus:


1-002.png, 1.004.png, 1-006.png ...



Finding files with the same file name in two different mounts


I need a script that I can run on a remote server to check if a process is writing the same files to two different mounts.


I would like to key on file name and list out any duplicates.


Could someone suggest the easiest way to do this?



Kali linux throws ' isolinux.bin missing or corrupt ' error using USB 3.0


Excuse me, I have the very same problem as this [thread][1] with a Live USB Kali Linux with Encrypted Persistence. I've downloaded kali-linux-1.0.9a-amd64.iso from the www.kali.org for my 64bit machine. And I've make sure with the checksum that my download was complete.


But here's what different for my problem.


To produce the Live USB I borrowed my friend's LinuxMint Live USB and use the dd command to do it. To set up the Persistence I boot-up the Live Kali (successfully) and then use the instruction from www.kali.org to set it up.


After that I rebooted the system and then tested the persistence capability which was working without no problem at all (Install an Application and then reboot the Live Kali to check if it was still there.) and then I shut the system down.


And the next day when I want to boot the Live Kali I got the "ISOLINUX.BIN IS MISSING OR CORRUPTED.", Could anyone help about what to do here? I'm confused... I've repeated the procedure time after time and still producing the same result! If I use UNetbootin or any other Live USB Creator, my computer won't even show the boot menu nor I could enter the bios setup at all, It just stay there at the Laptop's manufacturer Logo (I use ASUS N55SF) and I've tried it on 2 others computers as well, it won't boot at all, not even once!


Any help would be greatly Appreciated... Oh by the way I'm using the Silicon-Power USB 3.0 with 32GB of storage. And my Live LinuxMint that I've created on the side with the same method (for testing purposes) is working without any problems (Toshiba USB 2.0 with 16GB of Storage).



problems with installing elementary os luna


i m trying to install elementary os in my sony vaio laptop e series sve15127cnb. it has preinstalled windows 8. i tried to install elementary os with dual boot with windows 8. i downloaded 64 bit version from this website http://elementaryos.org/ and made a bootable usb with unetbootin-windows-608 software. when i rebooted my pc got the following option try elementary os install elementary os look for bad block(something like this) when i go in any of the options above i m only getting a blank screen and nothng else. i dont know wat to do? is this problem with some graphics or 64 bit. shall i try with 32 bit. because m getting only black screen and nothng else. what is the problem???????????



Sharing mysql data between windows and linux


I'm trying to share my mysql dbs between a windows and a linux distro (mint). I have a dual boot plus a separate Data partition (NTFS).


I've tried mounting the partition with mysql:mysql and a umask at 000 (chmod 777) but mysql always says :



Fatal error: Can't open and lock privileges tables: Table 'host' is read only


Tried this but it still won't work. Any idea ? I really don't want two copies of my databases on my computer.



Is there a way to specify the list of private keys to add to ssh-agent?


After a few hours of digging, I finally found out why my computer stopped asking me for my key(s) using gnome ssh-askpass. It was very simple, but took me forever to figure out because... well... most of the people who are having similar problems is for a completely different reason (i.e. ssh-agent not running).


In my case, I had too many keys under ~/.ssh so what I had done was to move them all, except id_rsa in a sub-directory: ~/.ssh/other_keys. That worked for the purpose of accessing some computers just using the -i command line option as in:



ssh -i ~/.ssh/other_keys/topsecret domain


Otherwise you have to tell SSH to not test all the keys found in your ~/.ssh directory (because when that happens, it exhausts the number of tries which is usually pretty small like 3 or 5.)


To fix this problem you could also do this:



ssh -i ~/.ssh/topsecret -o 'IdentitiesOnly yes' domain


Which is a lot of typing (yes, you can also add it to your config file, but if that's just for a quick test, that's an annoyance.)


So... all of that works great for when I want to connect once here or once there, but it is painful when I want to go to one of my main servers because ssh now asks me for my passphrase on each access, even though my ssh-agent and ssh-askpass are properly setup.


So... what gives?


Somehow, when you start ssh-add it automatically adds the keys to the ssh-agent without asking you for your passphrases. Then once you need to use the key, it automatically starts your ssh-askpass (no need for a variable of that name in your environment, btw) where you can enter your passphrase and move on.


If the keys are defined in a sub-directory, however, they do not get found so they do not get added to the ssh-agent and when you use ssh it does not find them in the ssh-agent either and thus asks you for your passphrase directly in your console and not in a gnome popup window.


Moving keys back directly under ~/.ssh fixes the problem, but that's not really a good solution since it breaks the ssh -i ... again. (I know, there is the -o ... option to tell ssh to use that one key only and that resolves that other problem. But I think ssh should test with the command line specified key FIRST and that would resolve both my problems. Oh well...)


So... when I run the following command:



ssh-add -D


It resets the ssh-agent keys by (1) deleting all the keys currently there; and (2) reinstalling all the keys found under ~/.ssh without asking me for any passphrase (at least not at the time I run the ssh-add command).


Would there be a way to ask ssh-add (or whatever other tool) to also add the keys found in a different directory such as my ~/.ssh/other_keys sub-directory and this without having to enter all the passphrases right then?



Can Nautilus-Actions Configuration Tool be used with Nemo file browser in Cinnamon?


In the past I used Nautilus-Actions Configuration Tool with Nautilus.


Can that be used with Nemo File manager (a fork of Nautilus originally)?



Are Cinnamon themes changing only the the panel?


Using Linux Mint 17 Cinnamon with different themes, I see that few elements are changing with the theme, while most remain unchanged, especially the general background of windows and applications, which remain grey.


Icons and windows decorations are changeable but not through the theme.


The only thing that really changes is the panel and its applets.


Firefox is not at all affected by system themes and even Firefox themes cannot change the colour too much.


The file managers are not affected by the change of theme. Not at all. Even the minty selection is unaffected. There is no flatness and no transparency for file manager windows and for windows in general. The grey is there to stay.


enter image description here


The general look is elegant but the lack of customization makes one think to the mac file manager than to a Linux environment.


While windows decorations can be changed separately, the space below them stays grey no matter the theme, so for the sake of consistency one is tempted to keep a default grey too.




Is this a general Cinnamon aspect or limited to Mint?


Or maybe I miss something here?



How to add ffmpeg/avconv command to Nemo actions?


I would like to have a command like this one



ffmpeg -i video.mp4 -vn -acodec copy audio.m4a


into a Nemo action (context menu).


But that would mean using variables instead of real names of files. (Also, preferably, instead of the input extension: I would like a command applicable to different extensions).


How to do that?



Indestructibles files on NTFS - cannot delete, not even by inode


I have a couple files on NTFS partition that seem to be indestructible - I tried all I know, and nothing:



.../test/db $ ls -la
total 37K
drwx------ 1 ondra ondra 32K Nov 30 23:54 .
drwx------ 1 ondra ondra 4.0K Nov 30 23:54 ..
-rw------- 2 ondra ondra 217 Oct 1 15:57 test.ipinfo
-rw------- 2 ondra ondra 364 Oct 1 15:57 test.sld_design_entry.sci

.../test/db $ rm test.ipinfo
rm: cannot remove ‘test.ipinfo’: No such file or directory

.../test/db $ ls . -q -1 -i --almost-all
950 test.ipinfo
909 test.sld_design_entry.sci

.../test/db $ find . -inum 950 -exec rm -i {} +;
rm: remove regular file ‘./test.ipinfo’? y
rm: cannot remove ‘./test.ipinfo’: No such file or directory


I tried umounting and remounting, same issue. How to get rid of them, short of wiping the partition?



Cacti installation shows only PHP code [on hold]


I am installing Cacti on my server by following this tutorial http://siddou.mynetgear.com/2013/08/install-cacti-on-debian-7-wheezy/


All went well but when I fire up the web browser Cacti all I see is the source code of PHP.


I have tried to update and upgrade the system and it is running Debian Wheezy 32 bit.



Formating file in command line for printing


Whenever I print a text file with lpr or lp commands , the words are cut off at the end of one line and continue onto the other, e.g. 'understand' would be split into 'unde' at the end of line one and 'rstand' at the beginning of other. Is there a way to justify the text of a file somehow for printing ? I've tried 'lpr -p' and '-o media=a4' , and fit-to-page option, but the words are still cut off. I've been looking around online and on stackexchange, but haven't found anything yet. Trivial question, of course, but still would be nice to know.


Solutions that worked for me:



  1. garethTheRed's fold: fold -s textfile.txt | lpr

  2. fmt command found here and here: fmt -u -w 80 textfile.txt | lpr ; note , that width 80 could be changed to whatever you like, but for me this seems to work well enough



cannot execute a.out from a bash script


i have created a bash script that have to open a file in background using cat and then execute a.out


cat NAV > tmp.txt& ./a.out


but its not working. Please help



auto login with Cubian (debian with mate)


How do I automatically log a user in using Cubian? I have tried removing the default users password but it still promotes to enter a username at the login screen.


I've tried editing the /etc/inittab to the following but with no success:



1:2345:respawn:/bin/login -f cubie tty1 </dev/tty1 >/dev/tty1 2>&1


Regex long list of numbers


What is the command in Linux to find the regular expression e for every number from 37 to 200 included?



Trying to generate random pass for users and saving them in a file


I'm trying to generate random pass of the users created by a text file in a bash script and then saving those passwords into a text file.. That's how I'm doing..


It works fine and creates user from text file and output the password as well well to lol file, but the passwords for created users wont work.


Here's my code, any help regarding that would be appreciated..



while read line || [ -n "$line" ] # protect against no newline for last line

do name=$line
pass=$(cat /dev/urandom| tr -dc 'a-zA-Z0-9' | fold -w 8| head -n 1 >> lol)

sudo useradd $name -m
sudo usermod -p $(echo $pass | openssl passwd -1 -stdin) $name

echo "The user - $name - has been created!"

done < "$fname" # double-quote fname echo


get only file name while iterating over directory instead of path with it


script.sh -i /storage/testFile


-i is stores path of /storage/testFile/


I want to iterate over file in testFile. Everything goes good, but I want to make this code more clean, add directory for output and other checks.


A snippet of my code is


for f in $inDir/*.vcf; do if [ -f $f ]; #check if file is true or exists then if [ ${f: -4} == ".vcf" ] # check if the file ends with .vcf then convert2annovar.pl -format vcf4 "$f" > ./"$f".avinput #run my code fi fi done


Issue:


echo $f I get /storage/testFiles/test.vcf


How do I get only test.vcf while I iterate in for loop?



Float MAC address in Heartbeat format




It's about a month I'm working about "High Availability" on Elastix based on DRBD and Heartbeat.

As you maybe be familiar with it, there is a file in Heartbeat called "haresources" that used for assigning primary server, replicated partition, starting services and finally creating a Float/Virtual IP address.

In haresources virtual IP address define with a format like "IPaddr::192.168.116.10/24/eth0/192.168.116.255".

As this virtual IP address created it will be assigned with a MAC address exactly the same as real interface.

Due to some problems on Voice Gateways, I think it's better to change the MAC address of virtual interface; but this changing should be placed on haresources and its format.

What should I do?!!

Thanks



How can I shutdown a RHEL server at 06:45 tomorrow morning?


I just received notification that our site has a power outage tomorrow morning.


I am a Windows admin but I have to cover for our Linux admin who's not around until tomorrow evening.


I need to shutdown our RHEL server at 06:45 tomorrow morning (without me doing it).


I have searched on here but see mixed answers using shutdown, some say -h, some say -p, some say something completely different.


It's ~21:15 now and I need to shutdown at 06:45 in the morning. What is the simplest way I can schedule this?



Linux Mint: Unable to uninstall / remove virtualbox


I'm using Linux Mint 17 and I have to uninstall virtualbox-4.3 from the system, but it's giving me the following error.



$ sudo apt-get remove --purge virtualbox-4.3

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
virtualbox-4.3*

0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 155 MB disk space will be freed.
Do you want to continue? [Y/n] y

(Reading database ... 194033 files and directories currently installed.)

Removing virtualbox-4.3 (4.3.12-93733~Ubuntu~raring) ...
/etc/init.d/vboxdrv: 85: .: Can't open /etc/init.d/functions
invoke-rc.d: initscript vboxdrv, action "stop" failed.

dpkg: error processing package virtualbox-4.3 (--purge):
subprocess installed pre-removal script returned error exit status 2

Errors were encountered while processing:

virtualbox-4.3

E: Sub-process /usr/bin/dpkg returned an error code (1)


Please help, i will be thankful to you.



Copy directory with SCP


I'm trying to copy directory from local drive to remote server with -r parameter, however I'm getting:



scp: System error: 1633648 (Failed to retrieve error string (err:317))


This is the syntax I use:



scp -i ~/.ssh/id_rsa -r temp username@http://remoteserver:/%username%/ext


Yes, I'm using identity file, so that it wouldn't prompt me for password. Anybody knows why am I getting the error?



How to limit the number of search results per directory


How to limit the number of search results per folder, for example:


With this command:



grep --include=*.php -Ril '<?' '/var/www/'


I get the following:



/var/www/test.php
/var/www/test1.php
/var/www/phpinfo1.php
/var/www/phpinfoo.php
/var/www/phpinfooo.php
/var/www/1/php.php
/var/www/1/php3.php
/var/www/1/index.php
/var/www/1/indexed.php
/var/www/1/indexin.php
/var/www/test/tester.php
/var/www/test/info.php
/var/www/test/inform.php
/var/www/test/conf.php


And i need only 3 results per folder, and therefore it is:



/var/www/test.php
/var/www/test1.php
/var/www/phpinfo1.php
/var/www/1/php.php
/var/www/1/php3.php
/var/www/1/index.php
/var/www/test/tester.php
/var/www/test/info.php
/var/www/test/inform.php


Sorry for the bad english. Thanks for help!



Received DUP when using ping. What should I do?


I was pinging Google last night and one of them came back as DUP(!). I did some reading and I found this in the man pages on ping(8):



Damaged packets are obviously serious cause for alarm and often indicate broken hardware somewhere in the ping packet's path (in the network or in the hosts).



Is this really a cause for serious alarm? if it is what should I do?


This occurred on a Windows 7 PC running Ubuntu Live (14.04) via usb drive. It is plugged into the internet with an Ethernet cable (cat 6?). It is using a PlugLink to connect to the router. I believe the provider is ATT Uverse.


edited to link to the man page referenced.



samedi 29 novembre 2014

Map reading/writing a file to getting output from/sending input to a script?


Suppose I have two scripts, script1.sh and script2.sh. I am wondering if there is a way to make a filesystem interface such that, for example, I can go vim file and then have my system run script1.sh and have the output from the script inside my editor. Then, when I write the file, the system would send the modified text as piped input into script2.sh.


Is this possible? I've looked into using 'inotify', which could run my desired script when the file was changed. But I haven't figured out how to do the first part yet, where opening the file itself just gets the standard output from some script.



Minimal install


I'm fairly new to linux but I want to install it on my chromebook with crouton. Is there a way to install something like lubuntu or xubuntu without any of the software normally bundled? For example, I don't need a music manager, libre office, an internet browser (I will install chrome). I would rather just choose these kinds of programs myself and install what I need rather than have them included. Is this possible?



How to append a date to all files in a directory without touching sub-directories via bash script


I'm currently taking a class for Operating Systems and we're learning to do bash scripts as part of the curriculum. I need to append the date to all the files in a directory without touching sub-directories via a script. I've been to cobble up a one-liner script that will append the date to all the files, but it hits the folders in the current directory as well.



for f in *; do mv -- "$f" "$f-$(stat -c %Y "$f" | date +%Y%m%d)"; done


This'll append the date to the end of the filename, but like I said, it hits the directories under it. I'm currently using version 4.1.2 of bash on RedHatLinux.


I'm confused as all get out because of how inexeperienced with Unix I am (I'm primarily a Windows user), so any help would be appreciated.



Unix Write a program that accepts a directory name on the command line?


he program checks that there is exactly one command line argument, then calls a sub. The sub finds all files in the directory that have 700 access permission (the owner has full permission, group and other users have no permission), and changes the access rights for these files so that everyone else can read the file (744 permission). The sub then prints the name and new access rights of all the changed files.


For added challenge, you may write this program without using a loop. Sample output:


$ ls -l dir1 total 5 -rw-rw-rw- 1 ucn2140 staff 1970 Mar 3 16:24 lab3 -rw-rw-rw- 1 ucn2140 staff 298 Mar 3 16:24 lab3.soln1 -rw-rw-rw- 1 ucn2140 staff 306 Mar 3 16:24 lab3.soln2 -rwx------ 1 ucn2140 staff 553 Mar 3 17:21 lab4.soln1 -rwx------ 1 ucn2140 staff 180 Mar 3 17:21 lab4.soln2 $ lab6.soln2 dir1 dir1/lab4.soln1 744 dir1/lab4.soln2 744 $ lab6.soln2 Usage: lab6.soln2 dirname



caldav + carddav behind squid


I am having issues with caldav and carddav behind squid. I am using gnome shell + evolution and when going through my proxy and evolution is in debug mode, I basically see that it cannot connect to google.com. When I disable the proxy and go straight out, it connects just fine.


Do I need to do something special to get caldav/carddav services through to google? Those are extensions to webdav, is that possibly causing a problem?



unix Write a program that takes any number of directory names as command line arguments?


Write a program that takes any number of directory names as command line arguments and an output filename as a last argument. The program checks that there are at least 2 command line arguments, at least one directory name and one output file name. The program produces one number for each directory -- the total number of bytes of all files in that directory, or zero if the directory could not be opened. Warn the user if a directory could not be opened and then move on to the next directory. Print all good output to the output file. Sample output:



$ lab6.pl dir1 ../dir2 dir3 outf
cannot open dir3:No such file or directory
$ cat outf
dir1: 4310 total bytes.
../dir2: 6579 total bytes.
dir3: 0 bytes.
$ ls -la dir1 | awk '{b += $5} END {print b}'
4310
$ ls -la ../dir2 | awk '{b += $5} END {print b}'
6579


openssl and OCSP


I'm trying to check the revocation of certificates in a script but I'm getting the following error:



unable to load certificate
140735258465104:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: TRUSTED CERTIFICATE


Here are the steps (using www.google.com as an example).




  1. fetch the certificate



    $ echo 'Q' | openssl s_client -connect www.google.com:443 > google.crt



  2. extract the URI of the issuer



    $ openssl x509 -in google.crt -text -noout | grep 'CA Issuers' | \
    sed -e "s/^.*CA Issuers - URI://


    this gives http://pki.google.com/GIAG2.crt




  3. fetch the issuer certificate



    $ curl --silent http://pki.google.com/GIAG2.crt > issuer.crt



  4. extract the OCSP URI



    $ openssl x509 -in google.crt -ocsp_uri -noout


    this gives http://clients1.google.com/ocsp




And now the final step:



$ openssl ocsp -no_nonce -issuer issuer.crt -cert google.crt \
-url http://clients1.google.com/ocsp
unable to load certificate
140735258465104:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: TRUSTED CERTIFICATE


What am I doing wrong?


EDIT


I just saw that http://pki.google.com/GIAG2.crt is in DER format. Converting it to PEM with



$ openssl x509 -inform DER -outform PEM -in issuer.der -out issuer.pem


brings me one step further, but



$ openssl ocsp -no_nonce -issuer issuer.pem -cert google.crt \
-url http://clients1.google.com/ocsp
Error querying OCSP responder
140735258465104:error:27076072:OCSP routines:PARSE_HTTP_LINE1:server response error:ocsp_ht.c:255:Code=404,Reason=Not Found


The error kind of makes sense since http://clients1.google.com/ocsp delivers a 404 but the URL is the one stored in the original certificate ...


The next question will also be how to automatically detect the format of the issuer certificate but I could use file and see if the file is binary or ASCII.



ps to show only processes that match more than one condition (AND)


According to the ps man page:



Except as described below, process selection options are additive. The default selection is discarded, and then the selected processes are added to the set of processes to be displayed. A process will thus be shown if it meets any of the given selection criteria.



I take this to mean that the matches are "OR"ed, not "AND"ed.


I am developing my own locking script which creates a directory (mkdir mutex) and writes PPID and PID information to a file in this dir. One of the functions in the script is to clean up stale lock files by looping through all lock files, and extracting $PPID and $PID. It next determines if a process which has PID $PID and PPID $PPID is still running.


However with ps I am getting all processes which have PPID $PPID, and I'm also getting PID $PID. I want it to show me only the process with pid $PID and ppid $PPID


I understand grep is intuitively useful here, but is there a "less expensive" method to use? Perhaps another process-related utility?




procps-3.2.7-16.el5



Formating file in command line for printing


Whenever I print a text file with lpr or lp commands , the words are cut off at the end of one line and continue onto the other, e.g. 'understand' would be split into 'unde' at the end of line one and 'rstand' at the beginning of other. Is there a way to justify the text of a file somehow for printing ? I've tried 'lpr -p' and '-o media=a4' , and fit-to-page option, but the words are still cut off. I've been looking around online and on stackexchange, but haven't found anything yet. Trivial question, of course, but still would be nice to know



Merging CSV files without loosing the header line


I need to merge two CSV files datasorted1.csv datasorted2.csv, but my hearders keep getting sorted. This is the cmd I'm using: head -n 1 datasorted1.csv datasorted2.csv > resultado.csv && tail -n +2 datasorted1.csv datasorted2.csv | sort -t "|" -k 1 >> resultado.csv


Sample data: Name|Email|Country|Company|Phone Brent Trujillo|tempus@mauris.org|Burkina Faso|Donec LLC|(612) 943-0167



Start sh script on startup in Linux Mint


I'm new to Linux, so not sure how to do what I want.


I have my_script.sh (executable, of course) like this:



#!/usr/bin/env bash
mate-terminal -e "bash -c 'cd /home/my_user/ruby_projects/my_app/';'rails s';exec $SHELL"


This script should open terminal, change current directory to the given one, start rails application without closing after that.


If I open terminal, go to the directory of the script, run ./my_script.sh - everything works perfectly and exactly how I want it to work, but every time I boot I have to do this manually.


So I went to Control center -> Startup Applications -> Add -> browsed my shell script, gave name -> Add


After that I restarted system and... :( Everything what I see is a few blinks on the screen (that is the opening and closing of mate-terminals) - everything happens so quickly that I can not see what it shows (however, all terminals should remain opened!). And, of course, no rails apps are started. All terminals are closed. How to fix this?


Update: at first my thought was that not all processes that were needed for rails apps started and that is why terminals simply closed, so I tried ty add sleep 10 for the script to wait till everything boots properly, but that changed nothing - blinking was just delayed by 10 seconds.



Linux Mint: Unable to uninstall / remove virtualbox


I am using the Linux Mint-17 and I have to uninstall the virtualbox-4.3 from the system but it is giving me the following error.


sudo apt-get remove --purge virtualbox-4.3


Reading package lists... Done Building dependency tree


Reading state information... Done


The following packages will be REMOVED: virtualbox-4.3*


0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.


1 not fully installed or removed.


After this operation, 155 MB disk space will be freed.


Do you want to continue? [Y/n] y


(Reading database ... 194033 files and directories currently installed.)


Removing virtualbox-4.3 (4.3.12-93733~Ubuntu~raring) ...


/etc/init.d/vboxdrv: 85: .: Can't open /etc/init.d/functions


invoke-rc.d: initscript vboxdrv, action "stop" failed.


dpkg: error processing package virtualbox-4.3 (--purge):


subprocess installed pre-removal script returned error exit status 2


Errors were encountered while processing:


virtualbox-4.3


E: Sub-process /usr/bin/dpkg returned an error code (1)


Please help, i will be thankful to you.



Public, Non-Root Access to file system?


I'm trying to structure an android project for continuous integration/continuous delivery via gradle and git.


The main code will be pulled from git on the build server without various files that contain keys.


Gradle needs these files to successfully build the project.


I will pull those files on the build server separately, but i'm looking for a common place to store these files both on my local env and on the build server. So that I can reference this location in ENVs, then point to that location in the gradle build file.


The build server runs in root mode, obviously my local is running as a user.


Where is a non-root accessible, public place in the linux file system besides /home/$USER?


The dist i'm using are ubuntu and debian.



Pinpoint strange text at initiation of SSH session


On my OpenSUSE 13.1 (Gnome 3) system, whenever I start a SSH session, somewhere in the initialization, the terminal outputs some strange lines.



Last login: Sat Nov 29 00:00:00 2014 from [HOSTNAME]
NAME=openSUSE
VERSIONuser@host:~>


Now, Last login: ..., I understand. But, why is it printing that NAME\VERSION string? I would expect it to output the following:



Last login: Sat Nov 29 00:00:00 2014 from [HOSTNAME]
user@host:~>


In fact, the output of SSH sessions to all of my other OpenSUSE machines matches this output I would expect.


I put echo statements at the beginning and end of the /etc/profile and ~/.profile scripts to see if the text came from those, but those echos output after the NAME\VERSION string, indicating that the strange output comes earlier than those profile scripts. Also, the strange output matches the beginning of the /etc/os-release file, though I don't know why the terminal would be printing that file's contents.


My /etc/ssh/sshd_config:



PasswordAuthentication no
UsePAM yes
X11Forwarding yes
Subsystem sftp /usr/lib/ssh/sftp-server
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL


So, why would my SSH sessions begin like this or how would I trace this quirk down?



redirecting output of running background job in bash


in bash I have some jobs running, in background. They are always producing random irrelevant error messages that pollute the terminal. I am not always so prompt to start them with the 2>&1 > /dev/null redirect. How can I redirect the output when they are already running?


thanks!



Why is my debian always in runlevel 5?


I have configured the line in /etc/inittab as follows:



# The default runlevel.
id:2:initdefault:


But after logging in the output of runlevel is as follows:



N 5


So why am I in runlevel 5 instaed of 2?


As an additionaly info here is uname -a output for my system


Linux d3bi4n 3.16.0-4-amd64 #1 SMP Debian 3.16.7-2 (2014-11-06) x86_64 GNU/Linux


Nice regards, matthias



What is "fuzz" in applying patches?


I was applying a patch with quilt in Debian packaging that an error occurred:



Applying patch debian/patches/fixshare.patch
patching file net/slirp.c
Hunk #1 FAILED at 529.
1 out of 1 hunk FAILED -- rejects in file net/slirp.c


I googled it and I've understood that this error is because of "Fuzz" in applying patches. Now, my question is what's fuzz and how can I solve my problem in applying quilt patches?


I've read this article and did the steps that it told, but still I have problem!



Archlinux effect of downgrading package


I'm using v8 version 3.26.x, but somehow to compile another package, it requires older version 3.19.x. I'm done downgrading the v8 and done compiling that package:



v8 3.19.18.4-1


What is the effect of downgrading package? would it break something that depends on it? such as chromium/google-chrome?



command to log out of LXDE directly


To log out of LXDE, I can click on the "Start" menu, click "Logout" and when the menu pops up click on "logout" again.


Or I can type lxde-logout in my terminal and when the menu opens, click on "logout".


Both options are too cumbersome. I need a command which will log me out immediately, without menu, or without other options.


Is this possible ?


I am using LXDE on Debian Wheezy



How can I shutdown a RHEL server at 06:45 tomorrow morning?


I just received notification that our site has a power outage tomorrow morning.


I am a Windows admin but I have to cover for our Linux admin who's not around until tomorrow evening.


I need to shutdown our RHEL server at 06:45 tomorrow morning (without me doing it).


I have searched on here but see mixed answers using shutdown, some say -h, some say -p, some say something completely different.


It's ~21:15 now and I need to shutdown at 06:45 in the morning. What is the simplest way I can schedule this?



Allowing USB WiFi to only connect to Loopback


I've been following along the with Ada Fruit's Raspberry Pi Access Point Tutorial, but there is a snag, I only want to allow connections from the WiFi device to connect to the loopback interface. The Raspberry Pi running an intranet service that's available to the intranet via the Ethernet, but I also want it to be available via WiFi without making the Raspberry Pi into an access point into the rest of the corporate network, as that's not allowed by our networking policy.


My question is, what part of the tutorial should I follow, and should I not follow to make this setup work?



Can't start a ZNC service


I try to start ZNC using the following command



service znc start


I get this error



Starting znc: /usr/bin/dirname: extra operand `2>&1.pid'
Try `/usr/bin/dirname --help' for more information.
[FAILED]


This is what the init.d script looks like



exec=/usr/bin/znc
prog=znc
config=/var/lib/znc
runas=znc

lockfile=/var/lock/subsys/$prog

start() {
[ -x $exec ] || exit 5
echo -n $"Starting $prog: "
# if not running, start it up here, usually something like "daemon $exec"
daemon --user $runas "$exec -d $config >/dev/null 2>&1"
# If you're reckless with your system, comment the line above and
# uncomment this one below... I just don't get it why
#daemon "$exec -r -d $config >/dev/null 2>&1"
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}


Anyone know what would cause this.


I'm running centos



Possibilities for executable symlink to non-executable file in Linux?


I have some Python scripts, that I keep in a repository; they are plain-text files, but if their executable bit is set, then the online repository page serves them as binary downloads, not as plain text pages. Thus, I'd prefer to keep these scripts non-executable.


However, I'd also like to use them, as well. In principle, I could do:



sudo ln -s /path/to/wherever/I/have/put/myscript.py /usr/bin/


... and then, if the script was executable (and has a shebang), I could just call on the command line:



myscript.py [ARGS]


... which is what I'd want. But if I make the script itself executable, then I have the repository download problem as stated above. And, as long as the script is non-executable, I'd have to call it with an extra python - and a which ( cause otherwise python would just look in the current directory for the file):



python `which myscript.py` [ARGS]


... which is still quite a bit of typing, which I don't like. Also, as long-as the file is non-executable, not even tab completion will work for my[TAB] even if it is in /usr/bin; only which will work.


Now, crudely - if I could have a separate, executable permissions on the symlink, I could hope to keep the original non-executable, and still be able to run directly via just myscript.py on the command line. I'm not sure if there is possibility for Mac OSX - but as How do file permissions apply to symlinks? - Super User notes, Linux definitely doesn't offer options for that: only the original file permissions are taken into account, the permission of the symlink itself isn't.


So I was wondering:



  • Is it possible to use a different type of link (maybe "hard link"?) for that kind of purpose?

  • Is there some kind of driver or software, which would basically allow you to make something akin to a symlink, but would be an identical copy of the source - except with its own set of permissions?



Bash script loop to grow parameters


I want to use whiptail to generate a checkbox list based on the output from another program. Only the first word on each line of the output from the first program is necessary, so I extract it using awk.


To learn about how bash handles arrays, I have been using this link by tldp. I got how to check the size of arrays from here.


This doesn't run as expected, but if I copy the echo output, and type "whiptail" in front of it, it does work.


How do I fix this code so that it works?


example program.sh:



#! /bin/bash
find ./ -printf "%f\n"


example mainscript.sh:



#! /bin/bash
MYARRAY=($(./program.sh -l | awk '{print $1;}'))
MYPARAMS=" --checklist \"\" 15 40 5"
i=0
while [[ $i -lt ${#MYARRAY[@]} ]]
do
MYPARAMS+=" \"${MYARRAY[$i]}\" \" \" off"
i=$[$i+1]
done
whiptail $MYPARAMS
echo $MYPARAMS
exit


X resources for keboard layout in ~/.Xresources


I am looking to define the keyboard layout in the ~/.Xresources file.


I tried many variants such as:



Xkb.layout: blah,blah

Xkbgroup: ctrl_shift_toggle

Xkb
option.grp_led: scroll



but without success.



Identify whether terminal is open in guake


I need to check in my .vimrc whether or not the terminal in which vim is opened is running in Guake. How can I see this? The $TERM variable does not seem to be quite right...



Extracting trace information using gawk


I am new to awk programming and am using gawk to extract trace information from a mrt file in order to use it further for analysis. I have successfully been able to extract trace information from a pcap file format but cannot figure it out for the mrt format. Let me explain what I am trying to extract first by showing you the exampleof pcap format.


My pcap input file is:



No. Time Source Destination Protocol Length User Datagram Protocol Info
1 0.000000 2001:4958:10:2::2 2001:4958:10:2::3 BGP 143 UPDATE Message
Frame 1: 143 bytes on wire (1144 bits), 143 bytes captured (1144 bits)
Ethernet II, Src: JuniperN_36:98:52 (5c:5e:ab:36:98:52), Dst: JuniperN_3e:bf:49 (78:19:f7:3e:bf:49)
Internet Protocol Version 6, Src: 2001:4958:10:2::2 (2001:4958:10:2::2), Dst: 2001:4958:10:2::3 (2001:4958:10:2::3)
Transmission Control Protocol, Src Port: bgp (179), Dst Port: 56797 (56797), Seq: 1, Ack: 1, Len: 37
Border Gateway Protocol
No. Time Source Destination Protocol Length User Datagram Protocol Info
2 0.326625 2001:4958:10:2::2 2001:4958:10:2::3 BGP 184 UPDATE Message
Frame 2: 184 bytes on wire (1472 bits), 184 bytes captured (1472 bits)
Ethernet II, Src: JuniperN_36:98:52 (5c:5e:ab:36:98:52), Dst: JuniperN_3e:bf:49 (78:19:f7:3e:bf:49)
Internet Protocol Version 6, Src: 2001:4958:10:2::2 (2001:4958:10:2::2), Dst: 2001:4958:10:2::3 (2001:4958:10:2::3)
Transmission Control Protocol, Src Port: bgp (179), Dst Port: 56797 (56797), Seq: 38, Ack: 1, Len: 78
Border Gateway Protocol
No. Time Source Destination Protocol Length User Datagram Protocol Info
3 1.178114 2001:4958:10:2::2 2001:4958:10:2::3 TCP 106 bgp > 56797 [ACK] Seq=116 Ack=20 Win=16384 Len=0 TSval=3269200636 TSecr=371929488
Frame 3: 106 bytes on wire (848 bits), 106 bytes captured (848 bits)
Ethernet II, Src: JuniperN_36:98:52 (5c:5e:ab:36:98:52), Dst: JuniperN_3e:bf:49 (78:19:f7:3e:bf:49)
Internet Protocol Version 6, Src: 2001:4958:10:2::2 (2001:4958:10:2::2), Dst: 2001:4958:10:2::3 (2001:4958:10:2::3)
Transmission Control Protocol, Src Port: bgp (179), Dst Port: 56797 (56797), Seq: 116, Ack: 20, Len: 0
No. Time Source Destination Protocol Length User Datagram Protocol Info
4 2.410144 64.251.87.209 64.251.87.210 BGP 228 UPDATE Message, UPDATE Message
Frame 4: 228 bytes on wire (1824 bits), 228 bytes captured (1824 bits)
Ethernet II, Src: Cisco_e7:a1:c0 (00:1b:0d:e7:a1:c0), Dst: JuniperN_3e:ba:bd (78:19:f7:3e:ba:bd)
Internet Protocol Version 4, Src: 64.251.87.209 (64.251.87.209), Dst: 64.251.87.210 (64.251.87.210)
Transmission Control Protocol, Src Port: bgp (179), Dst Port: 65502 (65502), Seq: 1, Ack: 1, Len: 154
Border Gateway Protocol
Border Gateway Protocol
No. Time Source Destination Protocol Length User Datagram Protocol Info
5 3.467853 206.47.102.206 206.47.102.201 BGP 105 KEEPALIVE Message
Frame 5: 105 bytes on wire (840 bits), 105 bytes captured (840 bits)
Ethernet II, Src: JuniperN_36:98:52 (5c:5e:ab:36:98:52), Dst: JuniperN_3e:bf:49 (78:19:f7:3e:bf:49)
Internet Protocol Version 4, Src: 206.47.102.206 (206.47.102.206), Dst: 206.47.102.201 (206.47.102.201)
Transmission Control Protocol, Src Port: bgp (179), Dst Port: 55700 (55700), Seq: 1, Ack: 1, Len: 19
Border Gateway Protocol


I wanted to extract the following fields from the file:



  • Time

  • Source

  • Destination

  • Protocol

  • Length User Datagram


I created a simple script:



{

if($1 ~ /[0-9]/)
{
print $2,$3,$4,$5,$6
}
}


And ran it on the input trace to receive (gawk -f script.txt input-pcap.txt >> pcap-out.txt) as shown below:



0.000000 2001:4958:10:2::2 2001:4958:10:2::3 BGP 143
0.326625 2001:4958:10:2::2 2001:4958:10:2::3 BGP 184
1.178114 2001:4958:10:2::2 2001:4958:10:2::3 TCP 106
2.410144 64.251.87.209 64.251.87.210 BGP 228
3.467853 206.47.102.206 206.47.102.201 BGP 105


Now, I want to do the same for mrt input format. The input file looks like:



TIME: 11/01/07 00:11:09TYPE: TABLE_DUMP/INETVIEW: 0SEQUENCE: 0PREFIX:
0.0.0.0/0FROM:96.4.0.55 AS11686ORIGINATED: 10/24/07 06:26:23ORIGIN: IGPASPATH: 11686
3561NEXT_HOP: 96.4.0.55STATUS: 0x1TIME: 11/01/07 00:11:09TYPE: TABLE_DUMP/INETVIEW:
0SEQUENCE: 1PREFIX: 0.0.0.0/0FROM:213.140.32.148 AS12956ORIGINATED: 10/24/07
06:26:16ORIGIN: IGPASPATH: 12956NEXT_HOP: 213.140.32.148STATUS: 0x1TIME: 11/01/07
00:11:09TYPE: TABLE_DUMP/INETVIEW: 0SEQUENCE: 2PREFIX: 3.0.0.0/8
FROM:207.45.223.244 AS6453ORIGINATED: 10/31/07 07:37:39ORIGIN: IGPASPATH: 6453 701 703
80NEXT_HOP: 207.45.223.244STATUS: 0x1TIME: 11/01/07 00:11:09TYPE: TABLE_DUMP/INETVIEW:
0SEQUENCE: 3PREFIX: 3.0.0.0/8FROM:195.219.96.239 AS6453ORIGINATED: 10/31/07
07:49:07ORIGIN: IGPASPATH: 6453 701 703 80NEXT_HOP: 195.219.96.239STATUS: 0x1TIME:
11/01/07 00:11:09TYPE: TABLE_DUMP/INETVIEW: 0SEQUENCE: 4
PREFIX: 3.0.0.0/8FROM:129.250.0.11 AS2914ORIGINATED: 10/31/07 06:09:07ORIGIN:
IGPASPATH: 2914 701 703 80NEXT_HOP: 129.250.0.11MULTI_EXIT_DISC: 6COMMUNITY: 2914:420
2914:2000 2914:3000 65504:70STATUS: 0x1


I wish to extract the following information in the same style as done in pcap format so that it can be read by the analysis software:



  • Time (difference from first packet time field in seconds)

  • Source (6th field, only the IP address is needed)

  • Destination (10th field)

  • Protocol/Origin (8th field)


I tried a couple of scripts but haven't been successful. Please advise. Thanks!



unable to fully install elementary os Luna on imac 11.1(late 2009)


I have tried to install Elementary os Luna(64bit) on my imac 11.1(late 2009 , processor intel i5, videocard ATI radeon HD 4850). At this moment it working but not very good, I will give you a summery of my installation process and my problems. First off I made a bootable usb using VMware and Startup Disk Creator, other methods did not work. When I boot up the Eos usb I get a grub , I need to hoover over install Eos en press the e-key to edit the code. I write down $ nomodeset xforcevesa and press F10 to boot. Now I am able to install Eos, I select my partition and make it ext4. At the and of the installation it ask me to reboot , I press on reboot and the first time I get just a black screen ,so I reboot again and get the Grub with Eos and Eos recovery mode. I need to hoover over Eos again and press the e-key to edit. I again write down $ nomodeset xforcevesa and press F10 to boot . It does no boot up in GUI -mode but in single cmd-mode(terminal). It ask me for my username and my password,which I gave.Then I write $ startx and get the error 'no screens found'. I looked around and found on the ubuntuforums that it had something to do with having Hybridgraphics. I used the info on this site (https://wiki.ubuntu.com/X/Config/HybridGraphics) and wrote the following down.


$ sudo apt-get update


$ sudo apt-get upgrade


$ sudo apt-get dist-upgrade


$ sudo apt-get install linux-generic-lts-trusty (raring and saucy did not work)


$ sudo apt-get install xserver-xorg-lts-trusty (raring and saucy did not work)


$ sudo apt-get install fglrx-experimental-13


$ sudo apt-get install fglrx-pxpress


$ sudo reboot


Now it boots up in GUi-mode but I have an invisible mouse the first 2 minutes. When mouse pointer becomes visible it's not a normal pointer but a X-pointer, I open some apps and discover dat the apps have no windows borders.I look around again and find it has probably something to do with fglrx . I open terminal and write down $ sudo apt-get purge fglrx* , and reboot the system. The first time I reboot I get a black screen so I reboot again and get the Grub again with the choice between Eos and Eos recovery. I need to hoover over Eos again and press the e-key to edit, I write down $ nomodeset xforcevesa , and press F10 to boot. Now it's boots up with a normal mouse cursor and I have window borders. I install firefox and the flash plug-in and discover that video is not working good, on YouTube don't have 30 frames/s more like 10 frames a seconds which make makes watching video inpossible. I look on the web again and find on the UbuntoForums that I need to install the right driver. I go the AMD site to download Catalyst legacy 13.1 ( the last version that supports my videocard ). I run the download in the terminal, the program pops-up , I try to install but it gave me the error 'more tools required' . My second attempt was using the ppa:makson96/fglrx , it did not work, it crasht Eos , so I need to repeat the process all over again.


To sum up: 1, Eos boots up only ones every two times and when it does I need to manually force $ nomodeset xforcevesa. 2, I'm not able to watch any video because off the slow response .


So here is what I need help with. All help is much appreciated.


P.S.


Sorry for my bad English it's not my native language.



Bash Script involving Text Search from the Clipboard


Suppose I have copied to the clipboard the following two lines of text:



Row 1: ABC


Row 2: DEF



Suppose I have a bash command BashArgument which takes two arguments:



$ BashCommand arg1 arg2



Is there a way for me to create a bash script which executes BashCommand with the string ABC (from Row 1) and the string DEF (from Row 2) as arg1 and arg2, respectively? That is, I execute the bash script and the output is


BashCommand ABC DEF


How does one do this?



Yum says dependency " libltdl.so.3" is required, but it's already installed?


I'm a Linux noob and have spent a few hours trying to get ImageMagick installed. I finally got an old version uninstalled, but am struggling to get the newest version installed. When I run the following command:



yum --nogpgcheck localinstall ImageMagick-6.9.0-0.i386.rpm


I get the following error:



Error: Package: ImageMagick-6.9.0-0.i386 (/ImageMagick-6.9.0-0.i386)
Requires: libltdl.so.3


My attempt to get libltdl.so.3 installed


I ran the following command:



repoquery -q -f */libltdl.so*


Which produced:



libtool-ltdl-0:2.2.6-15.5.el6.i686
yaf-0:1.3.2-1.el6.rf.i686
libtool-ltdl-devel-0:2.2.6-15.5.el6.i686


So I tried installing them one by one:



yum install yaf-0:1.3.2-1.el6.rf.i686
yum install libtool-ltdl
yum install libtool-ltdl-devel-0:2.2.6-15.5.el6.i686


But each one failed with:



Package ... installed and latest version


What should I do?


I read to try:



yum clean all
yum update


But that didn't fix the problem. I'm running CENTOS 6.6 i686.



Unable to allow SSH access for new user


I currently have an issue, what I am trying to do is disable the root login and use ssh to login as a new user, then su to root when needed.


I am unable to actually allow the user to login through root. I am able to login through SSH on root, but not the user I have made.


I have used the AllowUser command, still no luck.


Anything there is to fix this?


I am using CentOS 07.



$ grep <newuser> /etc/passwd
<newuser>:x:1000:1000::/home/<newuser>:/bin/bash]


/usr/sbin/sshd -Dd
debug1: sshd version OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type ECDSA
debug1: private host key: #1 type 3 ECDSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-Dd'
Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 22 on 0.0.0.0.
Bind to port 22 on 0.0.0.0 failed: Address already in use.
debug1: Bind to port 22 on ::.
Bind to port 22 on :: failed: Address already in use.
Cannot bind any address.


Making an exact copy of a Windows instalation


My goal is pretty simple: I need to make an exact copy of a windows partition. Then I can wipe it down, play with it and when I'm done, I can re-copy the partition back and have everything back in order.


I achieved this in the past by saving the partition table + using http://ift.tt/1lXsFgX but the whole setup is a bit "iffy". The end result is not "exactly" the same as the original and after 2-3 months I had to format the disk.


Does anyone have a better solution? Maybe a dd copy?



User cannot access a file after setting an ACL


I cannot enter a directory after creation in a folder with an ACL: I am attempting to limit rwx access to a folder for just a single group and no one else. I would like to be able to add new users to a group and have them gain access to a directory.


This is what I have done so far



  1. mkdir /mnt/files

  2. cp /media/usb0/backup/* /mnt/files

  3. chgrp filers /mnt/files

  4. chmod -R g+s /mnt/files

  5. setfacl -b /mnt/files # to remove user and other

  6. setfacl -R -d -m g:filers:rwx /mnt/files


  7. getfacl /mnt/files



    # file: mnt/files/
    # owner: root
    # group: filers
    user::---
    group::rwx
    other::---
    default:user::---
    default:group::rwx
    default:group:filers:rwx
    default:mask::rwx
    default:other::---



So far everything looks good . . .



  1. cd /mnt/files

  2. mkdir test


  3. ls -l



    d---rws---+ 2 jimmy filers 4096 Nov 28 14:32 test



  4. cd test



    -bash: cd: test/: Permission denied



Any reason I can't enter the folder I just created?




  1. getfacl ./test



    # file: test
    # owner: jimmy
    # group: filers
    # flags: -s-
    user::---
    group::rwx
    group:filers:rwx
    mask::rwx
    other::---
    default:user::---
    default:group::rwx
    default:group:filers:rwx
    default:mask::rwx
    default:other::---




using reletive pathname to change directory


Your current directory is home/sample_dir1/sample_dir/cambridge. Move to your home directory using a relative pathname (don't use cd by itself for this move):



Sorting a csv file


I'm started to learn Linux Unix and I need help...


I need to sort a csv file, but the the header row (1st row) keeps getting sorted. This is what I'm using: cat data1.csv | sort -t"|" -k 1 -o data1.csv


Please help!!!!



Received DUP when using ping. What should I do?


I was pinging google last night and one of them came back as DUP(!). I did some reading and I found this in the man pages:



Damaged packets are obviously serious cause for alarm and often indicate broken hardware somewhere in the ping packet's path (in the network or in the hosts).



Is this really a cause for serious alarm? if it is what should I do?


This occurred on a windows7 pc running ubuntu live (14.04) via usb drive. It is plugged into the internet with an ethernet cable (cat 6?). It is using a PlugLink to connect to the router. I believe the provider is ATT Uverse.


without knowing precisely what the danger is, would you say it's time for our viewers to crack each other's heads open and feast on the goo inside?



'Tar' the result of a 'find', preserving the directory structure


I want to tar all the *.txt file, that I get from the result of a find , that exist into a directory having a tree like this:



  • Directory_name



    • dir1







      • file1.pdf









      • file1.txt







    • dir2







      • file2.pdf









      • file2.txt







    • dir3







      • file3.pdf









      • file3.txt






(used name are just as example)


But I want to preserve the directory structure.


What is the command the could give me a tar.gz file with this content?



  • dir1



    • file1.txt



  • dir2



    • file2.txt



  • dir3



    • file3.txt





readline - why does does it only do carriage return and not a line feed when reaching end of line?


I developped a python application that uses the cmd module to make an interactive command-line interface. This cmd module uses readline for command-line management: completion, history...


My issue is: on the computer I'm trying to use that app, when I type too long lines, it goes back to the beginning of the line and doesn't put a line feed. So I'm writing over the line itself. This makes browsing and editing commands in history a real pain. Although it works well on my development box.


I tried changing the shell from which I started python (from bash to sh), no difference, I tried to change the terminal I used (from Terminator to XTerm or UXTerm), no difference.


What would be your guess about where it comes from and how to solve this issue?



Export passwords from the `pass` password manager


I've been using the pass password manager for a year or so now, and it's awesome, but sometimes I like to test other password managers and then I need my passwords back.


So far I've just been adding them manually as I need them, but if I want to migrate to another password manager I need a script, because I don't have the patience to do it one by one, considering I have near to a hundred (if not more).


Is it possible? Is there already a solution?


I've searched for a solution on and off for the past couple months and haven't been able to find one where it's "just run this script and boom exported".


Is there such a script? If not, what or where should I look into to make one?



Bash: issuing trap twice


I have a very simple question. I can't believe the Bash manpage doesn't explain this already, but anyway...


If I issue the trap builtin twice [for the same signal], what happens? Is the second command added to the first, or does it replace the first?



trap Foo SIGINT
...
trap Bar SIGINT
...


When SIGINT happens, does Bash just run Bar, or does it run Foo as well? Or something else...?



for loop not working for multiple lines


I have a array like this "Apple Banana Clementine Date"


I have to print like this:



1. Apple
2. Banana
3. Clementine
4. Date


Script file:



for i in "${fruits[@]}"; do
echo "$lineno. $i "
lineno+=1
done


output of myscript:



1. Apple
Banana
Clem....


I don't understand why it is not printing lineno and also why it is printing long gap b/w 1. and Apple. Thanks.



Export file names of a directory to csv


I have a question regarding exporting folder names to a csv file. I have read already many entries in the web to such topics but on nearly all the topic was about exporting filenames and size and dates etc.


Not only the folder names of a directory. I also tried to modify such a proposed solution but it does not work.


I tried:



ls -la | while read attr numitems owner group size date name
do
echo ${name} >> output.csv
done


But as i ran the script i only get error:



': not a valid identifieread: `name


I'am using RedHat Linux.


Can somebody help me with the problem?



OpenVPN using IPv6 on VPS


I'm trying to create an IPv6 tunnel using OpenVPN on Debian Sid. IPv4 is working fine, but I can't get IPv6 to work. I can ping the server and other clients using IPv6, but I can't reach the internet from a client.


I've done hours of research but I still don't understand IPv6 completely, so this problem may be something really easy to fix. Some explanation would be nice!


The problem is that I'm using a VPS and I only have one /64 subnet for everything:



2a00:a123:4:b5::/64


So I thought I could add this to my OpenVPN config (create a smaller /112 subnet for OpenVPN):



server-ipv6 2a00:a123:4:b5::80/112
push "route-ipv6 2000::/3"


Now when I run ifconfig tun0 I get:



inet6 addr: 2a00:d880:6:f2::81/112 Scope:Global


And my clients get:



client1,10.8.0.2,2a00:d880:6:f2::1080
client2,10.8.0.3,2a00:d880:6:f2::1081


I added all these 4 IPs in the SolusVM CP (I don't know if this is necessary, I thought it would be for the routing back to the VPS). I also set net.ipv6.conf.all.forwarding to 1.


Still, I can't reach the internet over IPv6 from the clients. If I run traceroute6 google.com on a client I get to the server IP, but only timeouts after that.


I also found this similar question, but the NDP proxy thing doesn't seem to work for me using the following command:



ip neigh add proxy 2a00:d880:6:f2::1080 dev tun0
ip neigh add proxy 2a00:d880:6:f2::1081 dev tun0


Why doesn't this pipe command work at this special bash script?


That script test.sh doesn't work after used pipe command. The result shows nothing. Why?



#!/bin/bash

fun=$( echo $1 )
echo "$fun"


commands are as follows,



$ echo 1 | ./test.sh


How to put .desktop launcher in autostart directory using makefile


I want my program to add a .desktop launcher to the ~/.conf/autostart directory. How do I do this?


I already have the following code to put the launcher in the applications directory:



desktopdir = $(datadir)/applications
desktop_in_files = hello_world.desktop.in
dist_desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)


Can you explain what this does exactly and what I have to add to also put it in the autostart folder?


Thanks!



Openbox shortcut double click


I wonder, is it possible in openbox to create shortcut to application where click one button twice triggers some command. For example to run dmenu I want to click ` twice fast.


If it's not possible in openbox is it possible in another one wm?



delete lines that sum to zero


I need to delete all lines in a file, if the values in all the columns are 0 (so if the sum of the row is 0).


My file is like this (13 columns and 60000 rows, tab delimited)



KO gene S10 S11 S12 S1 S2 S3 S4 S5 S6 S7 S8 S9
K02946 aap:NT05HA_2163 0 0 0 0 1 0 8 0 0 5 0 0
K06215 aar:Acear_1499 0 0 0 0 0 0 8 0 0 0 0 0
K00059 acd:AOLE_11635 0 0 5 0 0 0 0 0 8 0 0 0
K00991 afn:Acfer_0744 0 0 0 0 0 0 0 0 0 0 0 0
K01784 aha:AHA_2893 0 0 0 0 0 0 7 0 0 0 0 0
K01497 amd:AMED_3340 0 0 0 0 0 0 0 0 0 0 0 0


How can I do?



Forensics on ipad .img wont mount in Kali


I am attempting to do some forensics on my iPad. I am following along with this article from sans.. on page 13 is the start of the Jailbreaking section...I would like to mount the image and then find the files listed on the following pages.


Model A1219...I did redsn0w 0.9.14b2 the iPad is not 3G and I don't have a passcode on it.


I installed openSSH and did


ssh root@192.168.1.120 dd if=/dev/rdisk0 bs=1M |dd of=ios-root1.img


I can't get it to mount though...or couldn't find anything when trying to use Scalpel


tired this



mount -t hfsplus -o ro,loop /media/psf/Home/ios-root1.img /mnt/hfs/
mount -t hfs /media/psf/Home/ios-root1.img /mnt/hfs/
mount -t hfsplus /media/psf/Home/ios-root1.img /mnt/hfs/


dmesg | tail gives me hfsplus: unable to find HFS+ superblock



Configuration Question for libgd-2.1.0 Install


OK, So I think I have zlib-1.2.8 installed on my Linux system correctly. I used the following commands to do this:



./configure --prefix=/usr2/lib2 --eprefix=/usr2/lib2
make
make check
make install


Now I would like to install libgd-2.1.0 in a manner where it will use zlib-1.2.8. My goal is to install libgd in a seperate directory so I am attempting to use the following configuration command:



./configure --prefix=/usr2/lib3 --exec-prefix=/usr2/lib3 --with-zlib=/usr2/lib2


However, the output from the libgd configure command is telling me that zlib cannot be found:



configure:12550: checking for deflate in -lz
configure:12575: gcc -std=gnu99 -o conftest -g -O2 conftest.c -lz -lm >&5
/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
configure:12575: $? = 1
configure: failed program was:
| /* confdefs.h */
...
...
...
| main ()
| {
| return deflate ();
| ;
| return 0;
| }
...
...
...
configure:12584: result: no
configure:12593: WARNING: zlib is required - see http://www.gzip.org/zlib/


Apparently the libgd configure script is checking for deflate and is not finding it. How can I make this work with the target install directories as specified above?



User specific script on login


I am trying to run a script automatically under the following circumstances:



  1. A specific user logs in.

  2. Independently of how the user is logging in: be it through the shell, a desktop environment session, or something else.


To accomplish this and out of curiosity I am studying initialization scripts in general at the different stages of the booting process. My specific question seems to require a lot of work given how I am understanding those processes. I am wondering if there's a better, simple way. Let me explain how I understand things:


The typical way to run something when the computer boots, is by using /etc/init.d; this is far from what I need since it executes prior to log in;


The typical way to run something when run when log in takes place, is by using /etc/profile or more appropriately a script in /etc/profile.d; this is not what I need because every user will load the script I want to run.


The typical way to run something when a specific user logs in a shell is with ~/.profile (or equivalent depending on the underlying shell: ~/.bash_profile, ~/.bash_login, ~/.login, etc). This executes just for the specific user and is in principle what I need. The problem is that those scripts do not run on "session logins" under desktop environments.


So there seems to be no obvious place to accomplish what I need.


One can of course use the facilities of a specific desktop environment to run a script. But that is not portable across distributions, it is not what I want. For example in Ubuntu one can create a .desktop file and place it in ~/.config/autostart. But as soon as one wants to try a different distro the solution breaks. Also, since my script has nothing to do with graphics, it seems like the wrong thing to do.


Given this preamble, I would solve the problem as follows in principle.



  1. I would create a script in ~/etc/profile.d that script should calls a second script if it exists, in the user folder. It could be one of the above mentioned files, or a new one entirely. I will use ~/.profile for simplicity.

  2. For the specific user for which I would want to run my script, I would create an entry in ~/.profile that calls the script I want to execute. This should run even if I log in through the desktop environment.


Is this the reasonable way to do it? Will it work?



How to execute 32bit c++ program on 64bit linux?


So I got the c++ program I want to execute, but I get error:



zsh: exec format error: ./myProgram


file myProgram: myProgram: Mach-O i386 executable


My system is 64bit, so is it the problem why I cannot execute it?


P.s. I also tried on 32bit ubuntu VM, but I get:



bash: ./myProgram: cannot execute binary file: Exec format error


Nginx wordpress and its wrong path


I've a Raspberry and I installed nginx and over this I put Wordpress.


Wordpress installation come from an old backup of a websites that I hosted somewhere else. The URL was mydomain.com/home, now in the nginx's root I created the directory mydomain.com and inside another directory called home



../mydomain.com/home



Inside home are located all wordpress files.


When I type in the browser mydomain.com, it load an empty page (http://www.mydomain.com/home/). If I add wp-login.php I can access to the admin panel doing everything, but if I try to show published either posts or pages I get error 404.



How to recover the partition table using testdisk or gparted?


I have got a 1 TB seagate external hard disk which got corrupted somehow. I was able to recover the files using the photorec tool that comes with testdisk. But the files are not organised in their folders and file-names are also lost. So, lots of recovered data are useless.



root@vavaio:/home/vicki/Desktop/testdisk-7.0-WIP# fdisk -l /dev/sdc

Disk /dev/sdc: 1000.2 GB, 1000204885504 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525167 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6e697373

This doesn't look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/sdc1 ? 1936269394 3772285809 918008208 4f QNX4.x 3rd part
/dev/sdc2 ? 1917848077 2462285169 272218546+ 73 Unknown
/dev/sdc3 ? 1818575915 2362751050 272087568 2b Unknown
/dev/sdc4 ? 2844524554 2844579527 27487 61 SpeedStor

Partition table entries are not in disk order


And partitions discovered by photorec are shown as:



PhotoRec 7.0-WIP, Data Recovery Utility, October 2014
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdc - 1000 GB / 931 GiB (RO) - Seagate BUP Slim BK

Partition Start End Size in sectors
Unknown 0 0 1 121601 80 62 1953525167 [Whole disk]
P NTFS 0 0 1 121601 80 62 1953525167


Is there any way to correct my hard-disk?



Page size after pdfcrop don't match my calculation


I run



$ pdfcrop --margins '-36 -59 -49 -35' tmp.pdf tmpo3.pdf


But the page sizes before and after don't match with my calculation. My calculation shows that the page sizes in points after cropping should be 612-36-49 = 527 by 792-59-35 = 698 pts. But pdfinfo says it is 471 x 670 pts. I wonder why I am wrong?


My pdfcrop is PDFCROP 1.20, 2009/10/06 - Copyright (c) 2002-2009 by Heiko Oberdiek.



$ pdfinfo tmp.pdf
Creator: Preview
Producer: Mac OS X 10.7.5 Quartz PDFContext
CreationDate: Wed Sep 18 07:45:10 2013
ModDate: Wed Sep 18 07:45:10 2013
Tagged: no
Form: none
Pages: 6
Encrypted: no
Page size: 612 x 792 pts (letter)
Page rot: 0
File size: 85737 bytes
Optimized: no
PDF version: 1.3

$ pdfinfo tmpo3.pdf
Creator: TeX
Producer: pdfTeX-1.40.10
CreationDate: Sat Nov 29 08:49:30 2014
ModDate: Sat Nov 29 08:49:30 2014
Tagged: no
Form: none
Pages: 6
Encrypted: no
Page size: 471 x 670 pts
Page rot: 0
File size: 251449 bytes
Optimized: no
PDF version: 1.4


Public, Non-Root Access to file system?


I'm trying to structure an android project for continuous integration/continuous delivery via gradle and git.


The main code will be pulled from git on the build server without various files that contain keys.


Gradle needs these files to successfully build the project.


I will pull those files on the build server separately, but i'm looking for a common place to store these files both on my local env and on the build server. So that I can reference this location in ENVs, then point to that location in the gradle build file.


The build server runs in root mode, obviously my local is running as a user.


Where is a non-root accessible, public place in the linux file system besides /home/$USER?


The dist i'm using are ubuntu and debian.