747 reputation
46
bio website 0xAF.org
location Varna, Bulgaria
age 34
visits member for 2 years, 5 months
seen Oct 11 at 13:22

Jun
13
awarded  Yearling
Jun
3
comment Changing user to root when connected to a linux server and copying files
This is resource hungry. If you're copying some_directory with 10GB data, then you will need 10GB more space on the remote machine and a lot of time to wait for the copy. If the remote machine is using SSD for example, you will shorten it's life every time with this extra copy. You will put a lot of load on the remote machine's IO operations, this will slow down every service on the machine and can(will) overload the machine (with IO operations). I believe that in the general case my option is better, though your case seems to be satisfied with your solution.
May
30
answered Add poweroff to startup script
May
30
comment Changing user to root when connected to a linux server and copying files
Why dont you use rsync ? You will have more control over the permissions.
May
30
comment Changing user to root when connected to a linux server and copying files
If you can do 'sudo tar' w/o password, then your user can read/write any system file with the tar. i.e. /etc/passwd and /etc/shadow. Anyway, the whole concept in your OP is permitting this your user to read/write system files.
May
29
revised Changing user to root when connected to a linux server and copying files
added 90 characters in body
May
29
answered Changing user to root when connected to a linux server and copying files
May
29
comment Telnet on Linux Server
The OP needs to input 1 empty line after his input to be able to retrieve any response. Most HTTP servers will allow HTTP/1.0 communication. If the OP is trying to test the HTTP service only, he could just write "GET / HTTP/1.0" and hit the enter key 2 times.
May
29
comment Telnet on Linux Server
It seems you already did what you wanted to... You telnet'ed to the remote HTTP service and since you didn't type anything it closed the connection. You do not need to enable Telnet Service (Server) on any machine. You are using the telnet client. You can also use curl/wget/nc/whatever to do the same thing.
May
6
comment Why won't Linux connect to the internet through a VPN?
I'm glad it worked. It was obvious in your first question, but you needed to learn a few extra commands (@Hauke Laging), which will help you next time, hopefully. Though this will work for now, you probably need an automated way to change the DNS in resolv.conf, when openvpn connects. Using NetworkManager is the most popular way to do your networking. But if you are going to start openvpn by hand, you can checkout This Arch Wiki. It will show you how to make some up/down scripts to change the DNS.
Apr
30
awarded  Good Answer
Apr
30
awarded  Mortarboard
Apr
30
comment bash restart mysql when it gone run well in SSH part, but not in cronjob
try changing this line: RESULT=`mysql --host="localhost" --user="root" --password="password" --database="test" --execute="select browser from test limit 1"`, to this: RESULT=`mysql --host="localhost" --user="root" --password="password" --database="test" --execute="select browser from test limit 1" 1>/tmp/mysql.debug 2>&1` and see the output in /tmp/mysql.debug
Apr
30
comment Why won't Linux connect to the internet through a VPN?
@azaquiel, checkout the contents in /etc/resolv.conf (with root) and replace (or add) the "nameserver" line. To read something like this nameserver 8.8.8.8 (or any other DNS server IP address in place of 8.8.8.8).
Apr
30
awarded  Enlightened
Apr
30
awarded  Nice Answer
Apr
29
comment bash restart mysql when it gone run well in SSH part, but not in cronjob
You seem to be running the cronjob with root (considering your 2nd question). You don't need the sudo then. Just remove "/usr/bin/sudo" in front of the service calls. It should save you from the TTY problem of sudo.
Apr
29
comment How do display managers log a user in?
I guess you have to deal with PAM authentication and setting up the XAuth stuff. Probably execute the Xsession files too... You can get some hints from SLIM (Simple Login Manager)
Apr
29
comment Why won't Linux connect to the internet through a VPN?
Just a note, I guess if the OP were aware of these tools and how to use them, he won't be here, asking for help.
Apr
29
answered Does tar actually compress files, or just group them together?