Hi all,
When i try to transfer some doc from one server to another, i met this problem.
[root@esjirp62 ~]# scp .bashrc esjirp62new:~/p62
root@esjirp62new's password:
bash: scp: command not found
lost connection
[root@esjirp62 ~]# which scp
/usr/bin/scp
Just in a few minutes ago, i was using scp and now it is not working any more.
Why is this happening?
Centos 6.5
I ran into an interesting problem (on reddit) that I figured I could solve, but I have not been able to. Its simple,.. I added 'exit 0' to /root/.bashrc, and now I am trying to log in via ssh.
Everytime I do, it immediately exits when it runs the .bash_profile, which sources .bashrc, (which is immediate upon 'logging in')
I've tried:
Code:
ssh root@192.168.1.50 -t vim
vim scp://192.168.1.50/.bashrc
vim scp://192.168.1.50/root/.bashrc
ssh root@192.168.1.50 bash --norc
ssh root@192.168.1.50 /bin/bash --norc --noprofile
ssh -T root@192.168.1.50 "mv /root/.bashrc /root/.bashRC"
scp .bashrc root@192.168.1.50:/root/
ssh root@192.168.1.50 /bin/bash --norc --noprofile -vvvvvvvvvv
ssh -vvvvvv root@192.168.1.50 /bin/bash --norc --noprofile
ssh -vvvvvv root@192.168.1.50 /bin/mv /root/.bashrc /root/.bashRC
ssh -t -t root@192.168.1.50 << EOF
mv /root/.bashrc /root/.bashRC
EOF
ssh -t -t root@192.168.1.50 --norc << EOF
echo HELLO > /root/.bashrc
EOF
ssh -tv root@192.168.1.50 rm .bashrc
So,.. I am unable to get back into the system (as root, no other users exist) after adding 'exit 0' to .bashrc
Anyone feel like explaining why all of these failed (aside from saying SSH interactive logins run the .bash_profile/.bashrc files) or, offering a suggestion that works? Seems like if you have the root password, you should be allowed to modify the login process... since... you know... you are root.
Hi All,
Not able to find TREE command in EL6, its working fine in EL5. Need help on this.
Below are the details.
[root@localhost ~]# mkdir -p /college/sports/performer/cricket
[root@localhost ~]# tree /college/
-bash: tree: command not found
[root@localhost ~]# tree college/
-bash: tree: command not found
[root@localhost ~]# which tree
/usr/bin/which: no tree in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin: /usr/bin:/root/bin)
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
Hi, i am newbie. I have problems to transfer files between Linux to Windows. Here goes mi situation.
I have already install pscp in windows, i tested it typing pscp in command line, its ok. I have read that pscp is primordial to perform the transfers.
The problem is the next: i am located in /root, trying to transfer install.log to c:\temp, doing the next: pscp.exe root@192.168.x.x: /root/install.log c:\temp
and the result is:
-bash: pscp.exe: command not found
I am searching in the internet for a solution but with no success yet. Could you help me please?
Hi,
I have Redhat 5.3 running on my machine. But when I am login through putty it gives me below error.
Without running any grep command I get this error on login and the grep command doesn't work.
login as: root
root@IP's password:
Last login: Mon Feb 16 15:27:55 2015 from IP
-bash: /bin/egrep: cannot execute binary file
-bash: /bin/egrep: cannot execute binary file
-bash: /bin/egrep: cannot execute binary file
-bash: /bin/grep: cannot execute binary file
-bash: /bin/grep: cannot execute binary file
[root@bkpdrill ~]# grep MemTotal /proc/meminfo
-bash: /bin/grep: cannot execute binary file
I am looking to display the w (who) command to show only the
User TTY IDLE
http://screencast.com/t/vXb74kguJ
13:15:38 up 8 days, 16:48, 47 users, load average: 1.47, 0.95, 0.51
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
rf3 pts/0 192.168.11.72 05:58 48.00s 6.60s 0.00s -bash
user21 pts/1 192.168.21.177 04:32 8:41m 0.05s 0.00s -bash
user7 pts/2 192.168.11.114 17Mar15 6days 1.07s 0.00s -bash
user7 pts/3 192.168.11.114 20Mar15 4:54m 9.75s 0.00s -bash
user6 pts/4 192.168.11.85 11:02 7.00s 55.58s 0.01s -bash
user14 pts/5 192.168.11.183 05:06 29:08 2.80s 0.01s -bash
user14 pts/6 192.168.11.155 05:30 13:28 2.75s 0.00s -bash
user23 pts/7 192.168.11.62 05:48 25:09 0.95s 0.00s -bash
rf5 pts/8 192.168.11.118 05:58 6:51 5.30s 0.01s -bash
user2 pts/9 192.168.11.140 08:34 1:19 44.74s 0.00s -bash
user14 pts/10 192.168.11.141 06:02 12:14 9.46s 0.00s -bash
rf12 pts/12 192.168.11.69 06:02 2:07 9.44s 0.00s -bash
root pts/13 localhost.locald 12:29 9:10 0.05s 0.05s -bash
rf6 pts/14 192.168.11.79 06:04 14.00s 9.05s 0.00s -bash
user14 pts/15 192.168.21.113 06:23 11:29 1.71s 0.00s -bash
user5 pts/16 192.168.11.126 06:24 6:56 4.59s 0.00s -bash
user5 pts/17 192.168.11.126 06:25 6:19 31.59s 0.01s -bash
user11 pts/18 192.168.11.125 06:26 28:10 2.90s 0.01s -bash
user12 pts/19 192.168.21.123 06:35 13:16 0.88s 0.00s -bash
rf7 pts/20 192.168.11.80 06:35 2:06 7.64s 0.00s -bash
user12 pts/21 192.168.21.123 06:36 41:55 0.12s 0.00s -bash
So far I have this
w | awk {'printf ("6s\ts\n", $1, $2, $3, $5)'} |more
13:20:16 up
USER TTY
rf3 pts/0
user21 pts/1
user7 pts/2
user7 pts/3
user6 pts/4
user14 pts/5
user14 pts/6
user23 pts/7
rf5 pts/8
user2 pts/9
user14 pts/10
rf12 pts/12
root pts/13
This only shows the 2 columns
w |awk '{print $1, $2, $3, $5}'
13:21:01 up 8 16:53,
USER TTY FROM IDLE
rf3 pts/0 192.168.11.72 20.00s
user21 pts/1 192.168.21.177 8:46m
user7 pts/2 192.168.11.114 6days
user7 pts/3 192.168.11.114 4:59m
user6 pts/4 192.168.11.85 3:42
user14 pts/5 192.168.11.183 34:31
user14 pts/6 192.168.11.155 18:51
user23 pts/7 192.168.11.62 30:32
rf5 pts/8 192.168.11.118 12:14
user2 pts/9 192.168.11.140 1.00s
user14 pts/10 192.168.11.141 17:37
rf12 pts/12 192.168.11.69 30.00s
This shows some what hard to read and the columns don't line up correctly
is there a way to tab them in to columns that line up properly, or even something similar to the TOP command where the list will keep refreshing?
Hi all,
So ever since I installed livestreamer yesterday, oftentimes when I execute a command in bash it seems to be executing livestreamer and treating everything I actually entered as arguments. For example, I will type
sudo emerge -cav livestreamer
and I will get an error messaging advising me not to run livestreamer as root.
This seems to happen 100% of the time when the command I intend to issue refers to livestreamer in any way, and only some of the times when it doesn't.
I'm pretty new to linux, and I've been able to google my way out of a few problems so far, but this one has me baffled. I've checked my bashrc file for things out of the ordinary, but to no avail. Any and all help would be really appreciated. If I've left anything out let me know.
Hi all,
I am slackware 14.0 user. Recently I face one problem. As a root i can change one of my normal user's (assuming Peter) password. However, when I login as Peter, and try to change the password, the system does not allow me to renew my password.
root@slackwa /etc# ls -la | grep shadow
-rw-r----- 1 root shadow 9 Nov 29 2013 gshadow
-rw------- 1 root root 0 Jun 20 2013 gshadow-
-rw-r----- 1 root shadow 2272 Apr 12 22:44 shadow
-rw------- 1 root root 2274 Apr 12 21:40 shadow-
root@slackwa /etc# ls -la | grep passwd
-rw-r--r-- 1 root root 2362 Apr 12 12:58 passwd
-rw------- 1 root root 2306 Jan 8 17:38 passwd-
-rw-r--r-- 1 root root 2305 Aug 11 2014 passwd~
peter@slackwa ~$ which passwd
/usr/bin/passwd
peter@slackwa ~$ ls -la /usr/bin/passwd
-rws--x--x 1 root root 68725 Sep 14 2012 /usr/bin/passwd*
peter@slackwa ~$ passwd
Changing password for peter
Old password:
Incorrect password for peter.
The password for peter is unchanged.
One thing I can assure is the password I input is correct. I have another slackware 14 running on Dell R410, but it does not has this problem.
Please kindly advice. Thank you.
I have installed vsftp to the server , the status is running now , but when use the command "ftp localhost" , it pops the "421 Service not available." , would advise what is wrong ? thanks
bash-3.2# /etc/rc.d/init.d/vsftpd status
vsftpd (pid 580) is running...
bash-3.2# ps -ef |grep vsftpd
root 580 1 0 15:44 ? 00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
root 607 467 0 15:45 pts/0 00:00:00 grep vsftpd
bash-3.2# ftp localhost
Connected to localhost (127.0.0.1).
421 Service not available.
I have made a change to GRUB2 bootloader in etc/default/grub.
Now I need to run 'update grub' for the change to take effect.
However, the 'update grub' command on the terminal is giving this error message:
Code:
root@debian:/# update grub
bash: update: command not found
Can someone please explain why this command is no longer working?
I've had to make a change to grub because I tried to install a new distro which meant I had to alter grub.
The install wasn't successful so I deleted the grub file and then re-installed it.
The re-installed grub needs a change so I can get sound on my pc.
However, I can't add these changes because the 'update grub' command doesn't work.
I've checked the grub file with another debian distro and they are both the same.
So now I don't know if I need to check if a different grub file is the problem or anything else.
Can someone help?
Hello all,
I am working on setting up a script to set certain things and install them on new installs of linux, however I am running into an issue with appending code onto the end of my .bashrc.
I am trying to append
Code:
PS1='\033[1;32m[\A \u@\h \W]\033[0m$ '
into .bashrc and I have tried the following methods without success
Code:
echo PS1='\[\e[1;31m\][\A \u@\h \W]\$\[\e[0m\] ' >> /root/.bashrc
echo 'PS1='\[\e[1;31m\][\A \u@\h \W]\$\[\e[0m\] '' >> /root/.bashrc
echo 'PS1=\'\[\e[1;31m\][\A \u@\h \W]\$\[\e[0m\] \'' >> /root/.bashrc
echo "PS1='\[\e[1;31m\][\A \u@\h \W]\$\[\e[0m\] '" >> /root/.bashrc
as well as several others with not avail. the issue is that echo is interpreting the single quotes that I would like printed. I have tried escaping them with not luck. any ideas?