Tag Info

Hot answers tagged

22

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 ...


18

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

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


4

Unfortunately there is no generic answer to the question that you are asking. The reason is that Linux and Unix system allow complete freedom to install parts of the operating system in one or many partitions, local or remote. In addition to the partitioning freedom, some sysadmins routinely create symbolic links to well-known (i.e. FHS) OS directory names ...


3

You would need some sort of Out of band management system to do this properly. This would give you remote access over the network even without an OS or hard disk. Most computers in a data center have this sort of thing, but you will need to talk to the provider or whomever set up the boxes initially to get the details on how to use it.


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

The FHS might be of use, though as implementations might not adhere to it completely, you might want to double check. You basically need to check /, /usr, /var (on most systems /bin and /sbin are in / and not mounted on separate filesystems). On SuSE desktop environments and some larger packages might end up in /opt and so you might want to check that as ...


2

Just use the df(1) tool on the actual path you're trying to write to: $ df /usr/here-is-where-i-want-to-be/ Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 70105504 13177408 56928096 19% /


2

Ok, the repository has nothing to do with the workstation sub-channel, it's called rhel-6-desktop-optional-rpms. After I enabled that in the /etc/yum.repos.d/redhat.repo, yum found the gcc-c++ package.


2

In the settings for each virtual image, there are options what to use for an optical drive. You can toggle this to use either a virtual CD image or a physical optical drive from the host machine (your Linux OS). Each Virtual program manager is slightly different, but the idea is the same. Here what the setting looks like for VirtualBox running on windows, ...


2

You won't need to reinstall. One option is to boot off an installer image and then mount the storage device (make sure to do it as read-write), go in and manually fix the mounted copy, then boot back into your installed OS.


2

Maybe something in your keybinding is messed up. If you're on KDE, could you check the following: (If you're on Gnome, let me know) In the terminal screen goto Settings Choose Edit Current Profile Goto the Keyboard-tab Edit the default Type in the textarea a 6 in the Input-box What output do you get in Output-box? It should say 6. If you got a 6 ...


2

your subnet and your range are in different networks. the subnet definition must be in the same network as the range. Also, set your subnet host address to 0, not 1. .1 is a host, .0 is a network. ... subnet 192.168.56.0 netmask 255.255.255.0 { range dynamic bootp 192.168.56.25 192.168.56.200; default-lease-time 43200; max-lease-time ...


2

There are some generally-adhered-to stardards for linux filesystems: Here is a generic Linux fs overview Here is the RedHat-specific Filesystem Hierarchy Standard Based on these, creating an /opt/production/ would be a good possibility. However, many organizations roll their own so yes, you could create a /data without issue. The main consideration is ...


1

coreutils doesn't depend on gcc in Red Hat land. That's just daft :) Probably the handiest is to use the script that I based the timeout command on: http://www.pixelbeat.org/scripts/timeout


1

What you want to look at a TFTP-server and configure your clients for PXE booting. Then take a look at https://access.redhat.com/site/documentation/en-US/Red_Hat_Network_Satellite/5.3/html/Deployment_Guide/s1-provisioning-kickstarting.html which is slightly out of date but should get you going.


1

The location of the config file is depending on the terminal application being used. If you are using Gnome Terminal the settings are stored in ~/.gconf/apps/gnome-terminal.


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

Run make mrproper first of all, before make menuconfig. This will make make modules and make modules_install work without errors. Then run make install after all the other steps.


1

Now I can't kill that port, and I can't use the port for anything else. How do I find the daemon to kill it (ps -ef doesn't show it) and close the port? I cannot use lsof because I'm using Redhat. Others have pointed out one of the errors in the above. A second error is that one cannot "kill" ports. Ports are not processes. A third error is the ...


1

If your OS does not clean /tmp automatically, install tmpreaper or tmpwatch. They can be set to run as cronjobs so the cleaning is automatic. They are easily configured to follow your preferences for what to keep, what to clean, and when to clean it. On a debian-like system, run apt-get install tmpreaper. The configuration file is typically ...


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

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

Right after I posted this I tried: ln -s /etc/yum.conf /etc/yum/yum.conf and this fixed it. I thought the problem would be much more complex.


1

I'm not sure if this is the problem but if Apache is still running it might have a lock on those log-files. Maybe the /usr/bin/killall -HUP httpd does not kill Apache quick enough. Try shutting Apache down first and see if that helps: service httpd stop logrotate -f /etc/logrotate.d/apache service httpd start If you don't start Apache with service you ...


1

I changed the format of the config file to the following and it seems to be working fine now. /var/log/httpd/*log /var/www/html/NSLogs/access.log /var/www/html/NSErrorLogs/err.log { copytruncate daily size 500M compress dateext maxage 60 }


1

By creating a normal user account with a shell which either doesn't exist or doesn't allow user to run any commands. E.g. shell might be /bin/nologin or /bin/true. The idea is to give ownership of Tomcat files to a certain user instead of the super user, ie. 'root', so that when you run Tomcat you don't have to run that process as 'root'. For security, ...



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