Tag Info

Hot answers tagged

25

It strongly depends on how you call your program with sudo or su. E.g. on the system on which I am in this moment: .bashrc COMMAND $HOME $USER Env. $PATH 1. sudo -i (root) root root [1] 2. sudo -s (USER) root USER /home/${USER}/bin:[1] 3. sudo /bin/bash (USER) root USER ...


19

If you have full sudo access, you can become root using sudo su -, so the security point is moot. Indeed, there is a way to discern the difference between a program ran as root and a program ran under sudo - using getuid vs geteuid - but this is a contrived trick. Why would a patch system do that?


5

Note although the system call is called truncate, it actually is better interpreted as saying "Make my file report this many bytes in size". As per the system call manpage: The truncate() and ftruncate() functions cause the regular file named by path or referenced by fd to be truncated to a size of precisely length bytes. If the file previously was ...


5

There are a few differences if you are getting a root shell, as pointed out by @Hastur. If you are not getting a root shell, then there are more differences. The support member may have experience trying to do things like sudo patch -p0 < /root/patch.file where patch is run as root, but < (piping from a file) is not.


4

If you've got a LiveCD for your OS you can boot to that and mv it back to its original location


3

Try this: LD_LIBRARY_PATH="/old_lib64" mv /old_lib64 /lib64 If you need a terminal, hold ctrl + alt + shift and press 1


3

This is a good command to determine your GUI: pgrep -l "gnome|kde|mate|cinnamon|lx|xfce|jwm"


3

your subnet and your range are in different networks. the range definition must be in the same network the subnet defines. Also, set your subnet address to .0, not 1. .1 is a host, .0 is a network. finally, every option must end with a semicolon (;) ... subnet 192.168.56.0 netmask 255.255.255.0 { range dynamic bootp 192.168.56.25 192.168.56.200; ...


3

The wrong TZ is probably set via .profile, .bash_profile or bashrc, thus overriding the machine-wide TZ setting in /etc/timezone


3

On unix, the timezone for an individual process can be set by setting the environment variable TZ. Each process can have a different value for TZ and thus show a different timezone. If TZ isn't set, there's a system-wide default. In your second example, you ran ssh with specifying a command to run on the remote server. So ssh set up an ordinary interactive ...


3

The problem has been solved. There is small link at the lower left corner "Full disk summary and boot loader...". So click on this link, and you will probably see your disk drive and green mark, this means that bootloader will be installed, just uncheck this option and click continue, warning message will appear, but just ignore it. Now you can install RH ...


2

Run lsattr and make sure the files don't have the i attribute set. That means "immutable", and when it is set, nobody - not even root - can change them.


2

Try using the -t flag to see how the filename is stored, then specify the same name at the end of your extraction tar command, including any path/directories. As in tar --extract --file=some.tar exactfilename


2

The Apache API changed from 2.2 to 2.4, unixd_config was renamed ap_unixd_config (see Api changes from 2.2 to 2.4). You need a php module version that is compatible with Apache 2.4 or stay with Apache 2.2.


2

You probably have the command export $PATH (or something like it) in one of your initialization files (.profile, .bashrc, etc.)  Find it and change it, perhaps to export PATH (note: no $) or comment it out and see if anything breaks.


2

I use echo $XDG_CURRENT_DESKTOP Not sure if it's a 100% working solution, but proved to be good enough so far.


1

Gnome Terminal picks up the background colour from the profile in use, so any change will impact the background colour of all terminals using the same profile. The configuration key is stored in /apps/gnome-terminal/profiles/Default/background_color, where Default is the currently used profile. I have demonstrated it in below code. Open the file named ...


1

I beleive when using sudo access, a log file is created, however when running directly through root access there is not.


1

You can use -A to specify how many lines after a match you want printed. grep -A 20 '`database`.`tablename`' dump.sql This will of course also include the match, and you can pipe that to a viewer. There's no need for head here.


1

verify error:num=19:self signed certificate in certificate chain Indeed, the root certificate of this server is self signed, and not from a CA. It is a CA, its just not trusted ;) Unlike browsers (which trust nearly everything), OpenSSL trusts nothing (you have to tell it what to trust). Download your country's CA certificate (its usually not ...


1

You only have to install a few packages. Execute these commands to install and configure the EPEL repository: wget http://epel.mirror.net.in/epel/6/i386/epel-release-6-8.noarch.rpm rpm -Uvh epel-release-6-8.noarch.rpm Execute this command to install packages related to NTFS mount: yum -y install ntfs-3g ntfsprogs Attach NTFS drive and mount the ...


1

Try xmllint and the --xpath option: <xml> <hello>world!</hello> </xml> $ xmllint --xpath '//hello/text()' world!


1

For unzip command with range expression in filename, we need to escape both the range format and the wildcard in target filename, e.g. to unzip files with txt extension in order0710.zip, ... order0715.zip into folder txt_pool, we should issue command like this: unzip -jn order071\[0-5].zip \*.txt -d txt_pool


1

In centos, Mostly this problem is happened due to the cause of 2 versions of python are being installed in the same machine .. Centos is using python 2.6 by default with yum while there is another version of python that is installed and used in the current system by default .. that is why it is giving the following message It's possible that the above ...


1

If you're running Red Hat with Security Enchanced Linux enabled (SELinux), then you might be having a problem because SELinux is preventing sshd from reading $HOME/.ssh. To make SELinux happy, you have to do root@sshd-server# restorecon -Rv ~/.ssh To see if you're running with SELinux enabled use sestatus. Here's what it looks like if SELinux is ...


1

Linux, ubuntu and Solaris will clean your /tmp on reboot. But not AIX, file in /tmp will remain there. You can setup a cronjob to do it for you as root 0 1 * * * find /tmp -atime -14 -exec rm {} \; At 1h00 am, each day, it will find and remove files that were last accessed 14 days ago. or you can put -mtime -14 for the last modified files.


1

If you use default mail system in Redhat, then you likely use Sendmail. When you got nothing after the command, this is expected behavior. The error doesn't directly spit out after the command. Instead take look on /var/log/maillog. Maybe you get a clue in there.


1

It depends. Soon (how soon???) both will transition to systemd, in which case the command will be: sudo systemctl -a Until then, it is sudo service --status-all sudo initctl list for for sysvinit and upstart jobs, respectively.


1

If you have pasted the public key to authorized_keys in the format shown in question (---- BEGIN SSH2 PUBLIC KEY ----), it won't work. You have to use one-line format shown in PuTTYgen labeled "Public key for pasting into OpenSSH authorized_kes file". It would be like: rsa-key ...


1

Why are you installing one item at a time via a script? No need to do this when you can just place all items in one line like this: yum -y install libstdc++.i686 ibibcm.x86_64 librdmacm.x86_64 ibsim.x86_64 ibutils.x86_64 libcxgb3.x86_64 libibmad.x86_64 libipathverbs.x86_64 Now that said, I don’t believe all of the yum -y install directives are running ...



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