Tag Info

Hot answers tagged

6

The ssh user@ip is correct syntax. The other logs in to the host ip as you and tries to run a command called root. Please update your question with an explanation of what are you actually trying to achieve.


4

You can change this behaviour if you edit secure tmp option in /lib/systemd/system/mariadb.service. systemctl stop mariadb next edit /lib/systemd/system/mariadb.service as you change PrivateTmp to false: # Place temp files in a secure directory, not /tmp PrivateTmp=false # default is true and finally: systemctl daemon-reload systemctl start mariadb ...


3

Either manually look at the file with ls -l filename, or from a script you can use [ -u filename ] && echo SUID-bit is set See also man bash: -u file True if file exists and its set-user-id bit is set. See also info ls: The file mode bits listed are similar to symbolic mode specifications (*note Symbolic Modes::). But ‘ls’ ...


3

To set location of core dumps in Centos 6 you can edit /etc/sysctl.conf. For example if you want core dumps in /var/crash: kernel.core_pattern = /var/crash/core-%e-%s-%u-%g-%p-%t Where variables are: %e is the filename %g is the gid the process was running under %p is the pid of the process %s is the signal that caused the dump %t is the ...


3

At the stage where you have a directory tree containing a file …/etc/shadow (before building the filesystem image), modify that file to inject the password hash(es) that you want to have. The easiest way to do that is with recent enough versions of the chpasswd tool from the Linux shadow utilities suite (Debian wheezy is recent enough) with the -R option. ...


3

I'm assuming you are using a Debian/Ubuntu based system as they do not automatically remove older kernels, whereas Fedora and family do. List all your installed kernels with: dpkg -l | grep linux-image You'll get a list of all packages. Decide which ones you want to keep and remove the others: sudo apt-get autoremove linux-image-a.b.c linux-image-x.y.z ...


3

This cannot work. The outside LAN does not know how to handle the IP of your RaspberryPi. (=how to route the packets to reach your RaspberryPi) go to http://www.whatismyip.com/ to find out your public IP. Note it down, but don't tell us. You will have to point to this IP if you want to reach your RaspberryPi. Which port to use you have to define in a port ...


3

There is a utility, taskset, part of util-linux, for just this purpose. For example: taskset -c 0-15 script will run script and constrain it to use just CPUs with IDs 0 to 15. To check that your scripts are indeed constrained to run on the proper CPUs, you can look at the file /proc/<pid>/status: it will have entries named Cpus_allowed (a bitmap; ...


2

Well, first, what is an inode? In the Unix world, an inode is a kind of file entry. A filename in a directory is just a label (a link!) to an inode. An inode can be referenced in multiple locations (hardlinks!). -i bytes-per-inode (aka inode_ratio) For some unknown reason this parameter is sometime documented as bytes-per-inode and sometime as inode_ratio. ...


2

yes, outside X-server, in tty, try command: cat /dev/urandom >/dev/fb0 if colourfull pixels fills the screen, then your setup is ok, and you can try playing with this small script: #!/usr/bin/env bash fbdev=/dev/fb0 ; width=1280 ; bpp=4 color="\x00\x00\xFF\x00" #red colored function pixel() { xx=$1 ; yy=$2 printf "$color" | dd bs=$bpp ...


2

To rename mysql root user to newroot, follow the following steps. I've tested here! Log in as root first using mysql -u root -p grant all privileges on *.* to 'tempuser'@'localhost' IDENTIFIED BY 'somepass'; flush privileges; quit Log back in as the tempuser as follow: mysql -u tempuser -psomepass update mysql.user set user='newroot' where user = 'root'; ...


2

You have several options like adding the host you want to connect to into the /etc/hosts file: vi /etc/hosts, add: 10.0.0.1 host.where.i.want.to.connect.to make sure that 10.0.0.1 is an IP address which does not exist in your network. Using this method you are overriding the resolving of the host you have configured in your my_program.rb application. If ...


2

It's a year-old subject, but someone may be still interested... I can confirm that qemu-kvm can be successfully wrapped with tsocks relay, using ssh SOCKS proxy. For DNS, ttdns is run on the host OS, so incoming UDP-DNS request from guest OS/qemu-kvm is converted to TCP-DNS request, and then relayed over tsocks+ssh. Actual command-line used: # env -i ...


2

ps gets all his information from the mounted procfs, so without procfs there is no source to gain that information. The only option I see is to mount proc for the call of ps/top and then unmount it, that minimized the risk.


2

This is a security feature, described in the PID namespace man page. While processes may freely descend into child PID namespaces (e.g., using setns(2) with CLONE_NEWPID), they may not move in the other direction. That is to say, processes may not enter any ancestor namespaces (parent, grandparent, etc.). Changing PID ...


2

executing ls -l you will get something like: -rwSr--r-- 1 user user 8111573 Sep 26 2012 net-snmp.tar where the S (can be also s) indicate this file have SUID set S is set when you do not have execution flag set s is set when you have execution flag set


2

A file rename that doesn't cross file system boundaries is just a metadata change, so it should preserve the inode number. Generally speaking, opening a file and modifying its contents should not change its inode number, which only makes sense within a single file system anyway (but it will change the access times, for example). Note that some tools such as ...


2

By default on enterprise GNU/Linux and it's derivatives, the adduser command creates a user which is disabled until you explicitly specify a password for that user. Here is an example on CentOS 6.5, which should be the same as Scientific Linux. $ sudo adduser test $ sudo grep test /etc/shadow test:!!:123456:0:99999:7::: the reason for this is because ...


2

The fact that you: can't decompress the file then because it is not recognized as a gzip file indicates that this is not a quirk of the file command misdetecting the file format. The file is actually not valid or it is corrupt. If these files were generated with normal gzip with no errors reported and normal gunzip cannot then decompress them then ...


2

Looks like you've removed your login manager. Install a login manager(i.e. SLiM) and append ifup eth0 to your .xinitrc file.


2

According to your data samples in your question this seems to be what you want (otherwise clarify your question, please): awk '$5 > max { max = $5 ; out = $0 } END { print out }' datafile This will print that line in datafile where the value in the 5th column is the maximum. The program works as follows: For each line the fifth column element will be ...


1

No, here is the output: curl -Ls 'http://pastebin.com/raw.php?i=r2jYDZaw' jQuery(document).ready(function(){ //Check to see if the window is top if not then display button jQuery(window).scroll(function(){ if (jQuery(this).scrollTop() > 100) { jQuery('.scrollToTop').fadeIn(); } else { ...


1

Solved this. I was running in chroot.


1

I have in the past used RHEL and CentOS (a binary compatible clone built from RHEL sources) for my desktops/laptops. The issue I regularly ran into was that the driver support was not as bleeding edge in these distributions so my newer hardware was not always recognized or usable. Since I work on RHEL servers every day, I want to stay as close as I can to ...


1

Try with if $FLAG_Control && [ -d /path/to/dir ]; .... Note that the brackets are not part of the syntax for if; in this case you want $FLAG_Control to be interpreted as a command (true or false), and that will play well with && and the other [ ... ] clause. (This assumes that your variable is always set to either true or false.) The reason ...


1

This is a bug, and the fix hasn't been brought to the Debian repositories. Quoting ashkulz (who closed the bug report) : You're using the version of wkhtmltopdf in the debian repositories, which does not support running headless. So you can either... Download wkhtmltopdf from source and compile it (see the instructions in the INSTALL.md file ; you ...


1

You can inspect it by, e.g.: awk 'BEGIN { printf "%s", ORS }' | od -c


1

You wouldn't use Awk for this, but rather od (octal dump) For example, here is a simple text file created on a linux system with vi: lizard:~tmp$ cat foo This is a sentence. Here is the output of od: lizard:~tmp$ od -a foo 0000000 T h i s sp i s sp a sp s e n t e n 0000020 c e . nl nl 0000025 Notice that this file ...


1

It is impossible to dissociate the contents of the file from the inode which contains the file's metadata (timestamps, owner, permissions, etc.). Most metadata would be problematic if there was more than one set: not just the size (which obviously needs to match the content), but the modification time (which would have to be updated in every inode when the ...


1

For Ext4 a hard-link simply refers to an inode, which contains all the metadata. Therefore you cannot have different metadata using hard links. I'm not sure what exactly you are trying to do, but you could have a look at git, zip, or soft-links. All of them have ways of handling duplicated data.



Only top voted, non community-wiki answers of a minimum length are eligible