When I ls -l /etc/passwd, -rw-r--r-- 1 root root /etc/passwd When I login as myself, and rm /etc/passwd, it asks: rm: remove write-protected file '/etc/passwd'? If I say yes, will it actually delete the passwd file?
I'm guessing this problems came with one of the recent updates but I have no idea what it might be. I can "su" to the root user no problem in bash. However, I can't login to root through gnome on startup, nor can I login when asked to for things like allowing updates through the gui. Basically the root user is unavailable through the gui but is accessible through the command line.
I've had this system for over year and it just started doing this. Does anyone have a clue what I could do to fix this? I have already done the obvious of using "passwd" to change the root password to see if that action would correct whatever went awry without success.
The last update I was able to do, which must be close to the last time I was able to log in as root user was on 24 Feb. 2010 and it installed gmime, mozilla-xulrunner190, libgmime-2_0-3, mozilla-xulrunner190-gnomevfs, mozilla-xulrunner190-devel, gmime-sharp.
I'm on Ubuntu 11.04. I have read around about how to use curl to download a list of URLs from a text file, and everyone says to use Code:curl -K URLlist.txt. This is what the curl man page says as well. However, for even a simple file with one URL, this command outputs a bunch of weird symbols for me instead of downloading the file.For example, I have a text file "test.txt" with one line in the following format:
Code: url = "http://www.example.com/image.jpg" I use the curl command to download this file:
I wrote a hack script that outputs the following every so often: Code: 01/04/11 10:33:02: 97,1413,1447,2860 I must leave the data format the same --but I want a special number from it. In this case it's 97 and it's always going to be the first in the 4 columns of comma delimited items. I can extract with this:
Code: cat datafile | awk -F" " {'print $3'} | awk -F"," {'print $1'} But that's really sloppy. Can someone point out a better way of doing this (with awk) and tell me why?
I have a Western Digital Elite external HDD given to me by a co-worker that cannot remember their passcode to unlock the drive. The external HDD is an Western Digital Elite Model = wdbaac6400ch
I know I can ssh login without password from a local to a remote. My question is how I can ssh without password from the remote to another remote. Say, I have three machines: A, B, C where A is the local machine. I use the same private/public key pair for all the login. What I can do are:
1. ssh from A to B.
2. ssh from A to C.
3. If I am sitting in the computer B (or B is local), then I can ssh from B to C.
What I am not able to do is:
After I ssh from A to B, I cannot ssh from the B to C. When I try to ssh from B to C, it asks me a passphrase.
So I just turned my computer on and it was beeping rapidly, and it would stop if I hit "Enter". Also this came on my screen: Cannot set Fray", something like that. It boots fine..just what is that?
I have some data like below: interface Vlan1 description Management LAN interface Vlan41 description Somelan interface Vlan65 description Some other lan. service-policy input 2Mbps service-policy output 2Mbps
How can I get sed to look at this txt file and add a comma at the beginning of every new line between the interface lines. i.e.: interface Vlan1 ,description Management LAN interface Vlan41 ,description Somelan interface Vlan65 ,description Some other lan. ,service-policy input 2Mbps ,service-policy output 2Mbps
This is for educational purpose. In fact it is my lab tutorial for a subject.I want to capture the users password when he changes his password. Both new and old.This is the script i have come up with:
Code: #!/bin/bash echo "Changing password for user $USER."
I'm trying to write a bash script that has to extract values from a csv file. Problem is there are lines like this:a,b,c,"dd,dd,dd",e,f,gI'm using awk to extract the values but when I try it extract value 4 with awk I get:"ddinstead of:"dd,dd,dd"Does anyone know how to get awk to ignore commas within double quotes?
I've been installing/tweaking F12, and I've found something that I can't say I've ever seen or expected to find before: the contents of my ~/Documents folder has lost its permissions and ownership info. I restored it from a backup last night/this morning, and I've rebooted a few times since then. Other folders from the backup are OK, just Documents.I don't know what my options are. I could try to blow it away and restore it, but that doesn't answer what caused it. If there's a "relabel" or something, that might help... though I've never had to do it before. Could it be that after these two-and-some-change years, my hard drive is giving out? Good thing I have a recent backup... but it'd be a shame to lose all my work getting F12 to work again.
for a while I?ve seen hundreds of attempts via ssh against my system. They finally stop and this could mean only two things my security measures are working "NOT" or they actually got in. In any case browsing around my system for suspicious changes I found a file"agent.4015" on my tmp folder. This file denies read privileges to root and I?m afraid to chmod until I know for sure what it is.
I'm on Ubuntu 11.04. I have read around about how to use curl to download a list of URLs from a text file, and everyone says to use
Code: curl -K URLlist.txt This is what the curl man page says as well. However, for even a simple file with one URL, this command outputs a bunch of weird symbols for me instead of downloading the file. For example, I have a text file "test.txt" with one line in the following format:
Code: url = "http://www.example.com/image.jpg" I use the curl command to download this file:
Dir - test - ls -ld shows ls -ld testdrwxr-xr-x 2 joe stduser 4096 May 25 16:25 testinside test dir :-rw-r--r-- 1 admin stduser 0 May 25 16:25 a.txtHow to remove a.txt with out using sudo ..I just tried sudo -u admin rm test/a.txtrm: cannot remove `test/a.txt': Permission denied
I installed the wrong file and now I would like to remove it. It was one of those .tar.gz files you have to install with ./configure, make, make install.I suspect files were installed all over the place.Is there a utility for removing a .tar.gz file ?
Code: [jonas@webserver html]$ ls -l | grep file -rw-rw-r-- 1 jonas jonas 3323 2010-03-15 20:33 file.php [jonas@webserver html]$ rm file.php rm: cannot remove 'file.php': Permission denied The directory that holds this file is html :
I want to allow ssh only to user with rsa key file and also after authenticate the rsa key it will ask user login password, is it possible to add this type of duel security on linux box.
Situation as follows: i do su to root, then i create admin file with
cat > adminfile then i exit from root issuing exit command i can see following adminfile options -rw-r--r-- 1 root root 10 2010-06-16 16:25 adminfile however, after executing rm adminfile it really gets removed -rw-r--r-- 1 root root 10 2010-06-16 16:25 adminfile
[Code]...
As i see it - others have only read permision for that file so they shouldnot be able to remove it.. :/
I have got certain files which somehow contain abnormal character "Del" "0x7f" or 177 which represents Del. And this is causing SVN to reject these files and abruptly end the process. I need to remove those characters from the file names but am not able to. find or grep do not search the files. This is how the file looks like with ls or find code...
According to security manual only DNS, files, or LDAP should be allowed in nsswitch file however it seems like i have many other services configured in nsswitch files.
below are the content from nsswitch file. What services can be removed considering the system stability.
Code: passwd: files shadow: files group: files hosts: files dns
i want to remove words "Max" and "constrained" in a file given below:
Max 0.003745 constrained Max 0.004549 constrained Max 0.001689 constrained
[code]....
and further want to replace "Max" by line number so that i can plot the resulting file. i searched in forum, but couldn't do what i wanted to do. e.g. i used