I have just installed a new debian OS and want to change a file.
For some reason, gedit didn't come pre-packaged so I installed it with apt-get.
When I use a terminal as root, gedit won't open. I get the following error message:
Code:
gedit grub
(gedit:3679): EggSMClient-WARNING **: Failed to connect to the session
manager: Authentication Rejected, reason : None of the authentication
protocols specified are supported and host-based authentication
failed
Gedit will open page files on the desktop - but not on the terminal.
Is this because I haven't done something with the new install or should I remove gedit and reinstall?
I'm trying to recreate a relative symlink, to link "asymlink" to "somedir/actualfile" in /root/test/ but its creating 2 symlinks instead.
Code:
[root]# ln -t /root/test/ -s somedir/actualfile asymlink
[root]# ll /root/test/
total 4
lrwxrwxrwx 1 root root 18 Feb 16 06:15 actualfile -> somedir/actualfile
lrwxrwxrwx 1 root root 8 Feb 16 06:15 asymlink -> asymlink
drwxr-xr-x 2 root root 4096 Feb 16 06:15 somedir
I can do it with
Code:
cd /root/test
ln -s somedir/actualfile asymlink
but I'm trying to avoid the cd, and also avoid using the full path.
Does anyone know why the -t flag isn't working as expected?
Hi Guys,
i have this
Code:
uid=0(root) gid=0(root)
i would like to have the word "root" only from the first field, and later from the second field
i use the command
Code:
[root@v1-6 ~]# cat test-uid |cut -d"(" -f1
brms2
uid=0
[root@v1-6 ~]# cat test-uid |cut -d")" -f1
brms2
uid=0(root
it cut the word after the -d, how can i make it to cut the word BEFORE the -d
expected should be:
cut -d"(" -f1
root)
then i can proceed to eliminate the ) later on.
hope this is not confusing you guys
Thanks,
Dear Members,
I am trying to configure sftp on my Server (Redhat). But I am facing following issue.
Link used: https://www.linode.com/docs/tools-re...ian-and-ubuntu
These are the parameters added to /etc/ssh/sshd_config file :
Quote:
Match group filetransfer
ChrootDirectory %h
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
Permission home Directories are as follows :
Quote:
ls -ld /home/test1/
drwxr-xr-x 7 root root 4096 May 14 09:49 /home/test1/
ls -l /home/test1/
total 12
drwxr-xr-x 2 root root 4096 May 14 09:49 docs
drwxr-xr-x 2 root root 4096 May 13 11:43 nitish
drwxr-xr-x 2 root root 4096 May 14 09:49 public_html
Debug Command : sftp -vvv test1@Ipaddress
Code:
debug1: Next authentication method: password
test1@IP-address's password:
debug3: packet_send2: adding 64 (len 53 padlen 11 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug3: Wrote 144 bytes for a total of 1421
debug1: Authentication succeeded (password).
debug2: fd 4 setting O_NONBLOCK
debug3: fd 5 is O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug3: Wrote 128 bytes for a total of 1549
debug3: Wrote -1 bytes for a total of 1549
Write failed: Broken pipe
Couldn't read packet: Connection reset by peer
I need the user can't access/see the other directories other than it's own directory
Waiting for your response.
Thank you
Redhat-Keeda
Hi experts,
so the steps to install kvm is this:
Code:
sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager
according to this webpage: http://www.howtogeek.com/117635/how-...nes-on-ubuntu/
Can I make this simpler?
I want to do just one command: sudo apt-get install kvm, and it should call and install all these packages.
Thanks
Since a several days, I started to notice that my Fedora 20 is very slow, I ma using KDE and not Gnome. Wgen I fire system nonitor, I see RAM is around 60%, CPU shooting constantly 100 to 99%.
I opened a command line, ran top, getting "system-config-s" constantly not less than 95%
Quote:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
64461 root 20 0 278248 85492 1996 R 95.3 3.7 1268:43 system-config-s
36584 salam 20 0 244620 95068 14548 S 1.7 4.1 1:54.07 Xvnc
24814 root 20 0 297548 10460 3880 S 1.0 0.5 0:17.24 xrdp
20805 salam 20 0 636160 30136 24600 S 0.7 1.3 0:00.50 gnome-terminal-
21555 salam 20 0 123656 2940 2420 R 0.3 0.1 0:00.30 top
1 root 20 0 50960 8344 5324 S 0.0 0.4 4:12.21 systemd
.....
....
Thanks for your help
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.
Hello, this is my first post
First i would like to thank you all for answering other people questions because I've been able to learn from the forum a lot.
I need your help with something.
I have standard output from 'ls -laR /etc' command which looks like this:
Code:
/etc/X11/xorg.conf.d:
total 4
drwxr-xr-x. 2 root root 29 Apr 1 00:46 .
drwxr-xr-x. 5 root root 54 Apr 1 00:43 ..
-rw-r--r--. 1 root root 232 Apr 1 00:46 00-keyboard.conf
/etc/xdg:
total 12
drwxr-xr-x. 4 root root 36 Apr 1 00:43 .
drwxr-xr-x. 87 root root 8192 Apr 12 13:53 ..
drwxr-xr-x. 2 root root 6 Jun 10 2014 autostart
drwxr-xr-x. 2 root root 17 Apr 7 01:25 systemd
by using sed command:
Code:
sed -e '/./!d' -e '/^total/d' -e '/\.$/d' -e 's/:$/\//' list.txt
I have transformed it to the following form:
Code:
/etc/X11/xorg.conf.d/
-rw-r--r--. 1 root root 232 Apr 1 00:46 00-keyboard.conf
/etc/xdg/
drwxr-xr-x. 2 root root 6 Jun 10 2014 autostart
drwxr-xr-x. 2 root root 17 Apr 7 01:25 systemd
and now I would like to achieve absolute paths at the end of each row
Code:
-rw-r--r--. 1 root root 232 Apr 1 00:46 /etc/X11/xorg.conf.d/00-keyboard.conf
drwxr-xr-x. 2 root root 6 Jun 10 2014 /etc/xdg/autostart
drwxr-xr-x. 2 root root 17 Apr 7 01:25 /etc/xdg/systemd
How do I join(merge) filenames with corresponding absolute path to their parent directory?
I know how to extract filenames using awk and get this:
Code:
00-keyboard.conf
autostart
systemd
but I don't know what to do next. Should I use some hitech sed option or go for loop or try with arrays? Help. Heeeelp
when a command is typed(i.e. /path/to/the/program), as a normal user, he should be able to run that command , execute that program as ROOT and log out root after the execution is completed.
Only one user should be able to do it.
Hence, I have created a new user vj and added the following command in visudo:
Code:
vj ALL=(ALL) NOPASSWD: /path/to/the/program
Now user vj will be able to typein the command.
What I need is that the program which is been called must run as if it is run by a root user,and when the program is completely executed, exit the root user.
How do I proceed?
Thanks for any help
sudo apt-get remove dropbox give me this
sudo apt-get remove dropbox
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
cliffm@debian:~$ sudo dpkg --configure -a
Setting up nautilus-dropbox (1.4.0-3) ...
Dropbox is the easiest way to share and store your files online. Want to learn more? Head to http://www.dropbox.com/
Downloading Dropbox... 100
the terminal is not released.
How else can I get a clean uninstall of dropbox?
cliffm@debian:~$ sudo apt-get remove dropbox
[sudo] password for cliffm:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
cliffm@debian:~$ top
top - 10:51:47 up 53 min, 3 users, load average: 1.06, 1.21, 1.25
Tasks: 149 total, 2 running, 147 sleeping, 0 stopped, 0 zombie
%Cpu(s): 46.5 us, 4.2 sy, 0.0 ni, 49.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 1930056 total, 1431412 used, 498644 free, 41064 buffers
KiB Swap: 3929084 total, 0 used, 3929084 free, 593656 cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4142 root 20 0 115m 73m 4032 R 100.0 3.9 39:44.15 dropbox
644 root 20 0 0 0 0 S 0.3 0.0 0:01.02 usb-storage
4076 cliffm 20 0 376m 17m 10m S 0.3 0.9 0:03.69 gnome-terminal
4145 cliffm 20 0 1654m 478m 47m S 0.3 25.4 4:12.97 firefox
4464 cliffm 20 0 23172 1600 1140 R 0.3 0.1 0:00.04 top
1 root 20 0 10648 800 668 S 0.0 0.0 0:00.67 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.15 ksoftirqd/0
4 root 20 0 0 0 0 S 0.0 0.0 0:00.43 kworker/0:0
6 root rt 0 0 0 0 S 0.0 0.0 0:00.02 migration/0
7 root rt 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
8 root rt 0 0 0 0 S 0.0 0.0 0:00.04 migration/1
9 root 20 0 0 0 0 S 0.0 0.0 0:00.59 kworker/1:0
10 root 20 0 0 0 0 S 0.0 0.0 0:00.28 ksoftirqd/1
12 root rt 0 0 0 0 S 0.0 0.0 0:00.01 watchdog/1
13 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 cpuset
14 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper
cliffm@debian:~$ kill 4142
bash: kill: (4142) - Operation not permitted
cliffm@debian:~$ sudo kill 4142
cliffm@debian:~$ top
top - 10:52:53 up 54 min, 3 users, load average: 0.87, 1.13, 1.22
Tasks: 145 total, 1 running, 144 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.0 us, 0.3 sy, 0.0 ni, 98.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 1930056 total, 1356856 used, 573200 free, 41172 buffers
KiB Swap: 3929084 total, 0 used, 3929084 free, 593712 cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3733 cliffm 20 0 947m 100m 41m S 0.7 5.3 0:39.55 gnome-shell
4076 cliffm 20 0 376m 17m 10m S 0.7 0.9 0:04.02 gnome-terminal
4145 cliffm 20 0 1655m 481m 47m S 0.7 25.5 4:13.72 firefox
4468 cliffm 20 0 23172 1596 1144 R 0.7 0.1 0:00.04 top
644 root 20 0 0 0 0 S 0.3 0.0 0:01.04 usb-storage
2842 root 20 0 132m 18m 6368 S 0.3 1.0 0:36.38 Xorg
1 root 20 0 10648 800 668 S 0.0 0.0 0:00.67 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.15 ksoftirqd/0
4 root 20 0 0 0 0 S 0.0 0.0 0:00.44 kworker/0:0
6 root rt 0 0 0 0 S 0.0 0.0 0:00.02 migration/0
7 root rt 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
8 root rt 0 0 0 0 S 0.0 0.0 0:00.04 migration/1
9 root 20 0 0 0 0 S 0.0 0.0 0:00.59 kworker/1:0
10 root 20 0 0 0 0 S 0.0 0.0 0:00.29 ksoftirqd/1
12 root rt 0 0 0 0 S 0.0 0.0 0:00.01 watchdog/1
13 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 cpuset
cliffm@debian:~$