Programming :: Script To Evaluate If A Passwd File Has Changed

Apr 6, 2010

creating a script which evaluates whether or not the passwd file has changed.

View 4 Replies


ADVERTISEMENT

Programming :: Replace A Hash In A Shadow File Not Using Passwd?

Aug 5, 2010

What is the easiest way to replace a hash in a shadow file for one particular user, not using passwd, and when the current password is unknown?

View 3 Replies View Related

Programming :: Bash: Regexp In 'if' Doesn't Evaluate Correctly

Mar 1, 2011

I'm using an 'if' statement to check whether one of positional arguments is a word or a construction like "x-y", but something doesn't seem right.

Here is the relevant part of the code:

Code:
if [[ "$3" =~ [a-Z]-[a-Z] || "$3" =~ [a-Z] ]]; then
grepRange=$3; else grepRange=$4
fi
And for the input like this:

[Code]....

but shouldn't the $grepRange variable be blank in this case?

Bash version is 4.1.7(1)

View 6 Replies View Related

Fedora :: Evaluate The Ext3 File System Performance

Apr 13, 2010

I need evaluate the ext3 file system performance; i need define:

- services provided
- parameters and
- the performance with different parameter values; for example, changin the value of the "data" parameter (journal, ordered, writeback).

I do not know what services ext3 provides. Well, i know intuitively that it provides services to read, write and erase files. But, there are anything more?. Where can i find the API?. Is the ext3 file system POSIX compliant?

View 7 Replies View Related

General :: Delete /etc/passwd And Recover It With /etc/passwd - From Runlevel 1 The Lastly Created User Is Not Having His Account After Recovery?

Jan 14, 2011

we know that /etc/passwd - is a replica of /etc/passwd file and acts as a backup in any damage done to /etc/passwd file..i have observed a strange thing in RHEL 5.4....for example... if /etc/passwd has 100 accounts.. then /etc/passwd - is having only 99 accounts....when i add 101 useraccount with "useradd" then /etc/passwd has 101 accounts and /etc/passwd is having the 100th account of /etc/passwd - ..when i delete /etc/passwd and recover it with /etc/passwd - from runlevel 1 the lastly created user is not having his account after recovery.. what is the solution? this is same case even with /etc/shadow and /etc/shadow -

View 2 Replies View Related

Programming :: Inserting Usr Into /etc/passwd Via Script?

Jan 19, 2011

I need to either locate a script that is similar to what I am needing or figure out a better way of doing what I need. I have mutiple shops with AIX unix servers, using ksh with virtual terminals that connect. since these are on an internal network we have them connecting to the server as either usr01, usr02, etc. what I need to do is add 15 user's ranging from usr01-usr15 into /etc/passwd each usr is identical in such that each line contains

Code:

usr01::0:0::/usr/tops:/bin/ksh

only difference is the usr# changes. I wrote a script where I was just adding these all to the /etc/passwd but now I have been tasked with adding them to these shops but with out any duplicates. is there any way to have a script check the file to see if the usr# exists and if so proceed to the next number and then input the usr#::0:0::/usr/tops:/bin/ksh into the file?

View 7 Replies View Related

General :: Exactly Is There In The /etc/passwd File?

May 20, 2010

Well we all know that it holds passwords. But cat-ing it gives out nothing. Not even encrypted gibberish. So how exactly is a password stored in this? Is this like a device file or something?

View 4 Replies View Related

General :: How To Restore The /etc/passwd File

Sep 18, 2010

I was doing some experiment about resource-accessing. By mistake, I executed this command,$ sudo mv /etc/passwd /etc/passwd.bakThen I could not execute any command with privilege(eg. sudo mv /etc/passwd.bak /etc/passwd). When I shut the system down, I could not boot it any more.

View 2 Replies View Related

General :: When Look In The /etc/passwd File, Don't See Username There?

Aug 10, 2010

I got a user account on a linux network. But when I look in the /etc/passwd file, I don't see my username there. Where would I find my username

View 3 Replies View Related

General :: How To Recover /etc/passwd File

Apr 11, 2010

Unfortunately i lost my passwd file...so who to recover that.

View 8 Replies View Related

Server :: SVN Passwd File On Debian 5.0.7 And Apache2

Dec 31, 2010

I have a Debian 5.0.7 installed to my server. I try to install Apache and SVN to this server. I use this tutorial: http://www.howtoforge.com/subversion...-ubuntu-server
But is unfortunately not working.

My apache virtual host configuration file is:

Code:

This passwd file containing 1 user:

Code:

The rights for the passwd file:

Code:

And apache2 is running like this:

Code:

And if I try to login to my page I got an "Internal Server Error" page.

And my error is in the apache log is this:

Code:

So I'm a little bit confused about it. The apache2 should have rights to open this file. I checked it, the file is exist and the apache2 is have rights for it. I don't understand it.

View 1 Replies View Related

CentOS 5 :: Script To Compare File To /etc/passwd?

Nov 10, 2009

I have a list of locked accounts, called lockedusers, how can I with a bash script compare it to /etc/passwd on the server and print them out if they match?

View 2 Replies View Related

General :: Deleted Root From Passwd And Shadow File

Oct 7, 2010

I deleted root from passwd and shadow file.Can I crate a new root user?

View 1 Replies View Related

Security :: Deleted File Stripes / Log Into A Passwd Less Acct?

Jul 2, 2010

I work for a seismic company that has recently experienced a security issue. Because we have an isolated network that is used for HPC work we have a very open security structue ie password less accounts rsh rlogin etc. We had, seemingly,a user that has maliciously deleted another user's files but I still haven't figured out how. So far I have been able to prove that this user has remotely logged into another host under that user's account... or at least that their workstation did. The /var/log/message file shows logins from their workstation as that user multiple times durring the times that these files were being deleted. There are wildcard searches for these files in the history in this host. There is a vi session initiated on this host for a file called delme (delete me) and then a chmod +x for this file. and then a deletion of this file (rm delme). Funny things: this user has no business in this acct. this user was bounced off the other host (permission denied) when trying to log into the other host and then as root logged into the other host as the other acct. repeatedly... ie. rsh -l xxx (permis den) then as root rsh -l xxx (logged in) why not su xxx and then rsh? password less acct?! why use root privs (which they sholuld not have) to log into a passwd less acct? Can't see any remote logins to their workstation from elsewhere. can't find smoking gun. no execution of delme script or any other rm /*/xxx/* sort of command that proves when file deletion of striped files happened?!

changing root passwd soon.need proof that no remote logins to a CentOS 5.3 workstation could be responsible.
Could mean someone gets fired.how can I be sure that no other users logged into this machine and then into another machine for sure?

View 2 Replies View Related

Ubuntu :: Filed Of /etc/passwd File Is The Login_shell \ Replace It To /usr/bin/date?

Jun 22, 2010

the last filed of /etc/passwd file is the login_shell;how if I replace it to /usr/bin/date
what would it happen.by the way I try to use $ subut do't know the password.what s the default root passworf for ubuntu

View 9 Replies View Related

General :: Find Command When Loggin As A Normal User And Search For A File Passwd Under?

Dec 25, 2010

when loggin as a normal user and search for a file passwd under /etc. i get few errors with permission denied.how to ignore this permission denied errors.

csh hostname 109 % find . -name passwd
find: ./lvm/backup: Permission denied
find: ./lvm/archive: Permission denied

[code]....

View 4 Replies View Related

OpenSUSE :: Updated To 11.4 [64 Bit] - Rkhunter Is Giving Warning: User 'rtkit' Has Been Added To The Passwd File

Mar 13, 2011

i have just updated to openSuSE 11.4 [64 bit]; rkhunter is giving these Warnings :

Warning: User 'rtkit' has been added to the passwd file.
Warning: User 'pulse' has been added to the passwd file.
Warning: User 'statd' has been added to the passwd file.
Warning: Changes found in the group file for group 'audio': User 'pulse' has been added to the group
Warning: Group 'rtkit' has been added to the group file.
Warning: Group 'pulse' has been added to the group file.
Warning: Group 'pulse-access' has been added to the group file.
Warning: Suspicious file types found in /dev: /dev/shm/initrd_exports.sh: ASCII text
Warning: Hidden directory found: /dev/.sysconfig
Warning: Hidden directory found: /dev/.mount

Do these look Normal, Are these False-Positives??

View 4 Replies View Related

Ubuntu Networking :: File 'path Omyfile' Has Been Changed On The File System?

May 28, 2010

I have asked this over on Launchpad and have found bugs filed on the eclipse bug tracker but it seems to be going nowhere so I guess ill ask here.

I am using Eclipse for some development work and having saved a file, defocus the eclipse window (to test changes in a browser) when I refocus the eclipse window I get the following error...

The file 'path omyfile' has been changed on the file system.Do you want to replace the editor contents with these changes?

I have searched and searched and this seems to be a CIFS/SAMBA problem. I even found one solution suggesting that changing his mounts from cifs to smbfs fixed his problem however that would appear not to be an option for me since using smbfs in the fstab causes cifs mounts. This problem would seem to occur in Bluefish as well as some other IDE's so it is not an Eclipse issue.

---------- LINKS TO RELATED ----------
Launchpad Question
Eclipse Bug
--------------------------------------

View 2 Replies View Related

Programming :: Users Who Have Never Changed Their Password From /etc/sha

May 17, 2011

I need to create a script that returns a list of the users who have never changed their password from /etc/shadow.

As I know on linux there is a command "chage" used for find last password change. Any idea about solaris command?

View 1 Replies View Related

Programming :: Value Gets Changed When Passed To A Function In C++

Jun 10, 2010

Why do I see different values of character 'a', in main() and in functionA() in the following C++ code?

Code:
#include <stdio.h>
#include <string.h>
#include <iostream>
using namespace std;

[Code]....

View 7 Replies View Related

OpenSUSE Hardware :: How To Evaluate Cpu/processor Performance

Aug 23, 2010

Are there any tools available in openSUSE for evaluating cpu/processor performance. My processor/cpu is under warranty til end of October, will like to know whether I need to get new one or i am good. I am looking for something that can log an event and report. Have tried stress and crashme but they dont show any results.

View 9 Replies View Related

Ubuntu Installation :: Inspect And Evaluate The Mbr On A Disk?

Aug 5, 2011

How can i inspect and evaluate the mbr on a disk in a computer?

I'm interested in how to do this in general.

I can use gparted to see the partitions on a disk, but i don't know how to use it, or any other tool, to see just what is in the mbr.

The particular situation i'm in is that i have two disks in my computer. One has ubuntu 10.10 on a single partition, and one has 11.04 on one of 4 partitions.

The 11.04 disk used to be bootable, but somehow i messed up the disk: longer story: i installed another os on another partition, and the other os redid the mbr and installed a different version of grub, and i tried to reinstall grub but ended up with a disk that wouldn't boot. So i put my old 10.10 disk back into the machine so that i could at least boot and look around on the 11.04 disk.

Now, there are probably ways that i could recover the 11.04, but i would like very much to be able to systematically analyze the 11.04 disk to determine its exact current state before modifying it.

Since the disk is not mounted it seems like this should be in reach: i want to be able to (a) capture the mbr from the 11.04 disk [into, say, a file on the 10.10 disk] (b) get an analysis of what the mbr would do (where it points to etc, and what is at where it points to) (c) get any high level information which can easily be determined from (a) and (b).

View 5 Replies View Related

General :: Evaluate Size Of Output Command?

Nov 18, 2010

I'm trying to do something like this:

Code:
#!/bin/bash
cmd1=$(cat /var/log/messages | grep -e 'blocked for more than 120 seconds' | cut -c 55-62)
if $cmd1 != 0; then echo 'okay'; fi

however i'm messing up somewhere... bash attempts to evaluate the elements in cmd1. when I try to run this script it complains saying:

Quote:

test1.sh: line 5: blocked: command not found

I am open to alternatives. My intent is to replace cat /var/log/messages with dmesg, so I can attempt to determine if a problematic application I use encounters a blocked state (unresponsive for more than 120 seconds).

Should I be using a different test condition? I tried something like:

Code:
# this declares cmd1 as an array
cmd1=($(cat /var/log/messages | grep -e 'blocked for more than 120 seconds' | cut -c 55-62))
#attempt to determine if number of elements in array is greater than zero
if ${#cmd1[@]} > 0; then echo okay; fi

But I get the same error... what am I doing wrong?

View 3 Replies View Related

Red Hat / Fedora :: Root Line Passwd File Now Unable To Login As Root?

Jan 26, 2010

I edited the passwd file to modify the default shell for root from bash to tcshnow when I try to login to root it gives me the following error:"su: /bin/tcsh : No such file or directory"

View 3 Replies View Related

Programming :: Pyqt3 How Fast Can A TextLabel Be Changed?

Mar 12, 2010

I want to read values from a text file about 2 times a second and update a textLabel with those values but it only inputs the values with the last value from the text file? I tried the same thing with an LCDNumber but it only updated every 10 value changes? After each change do I need to clear the textLabel or refresh the window? For testing the print z and print x in the code prints the values correctly.Heres my code:

Code:
def Timer(self):
import time

[code]...

View 2 Replies View Related

General :: 'su ' Error "No Such File Or Directory I Cannot Delete That Entry From /etc/passwd As I Cannot Login As Root"

May 15, 2010

[Code]....

Password: su: /bin/bash:/sbin: No such file or directory i cannot delete that entry from /etc/passwd as i cannot login as root.

View 11 Replies View Related

Fedora Installation :: Evaluate The Checksum - Burned A CD With The Disc1.iso

Apr 1, 2010

I've downloaded the

Fedora-12-x86_64-disc1.iso
Fedora-12-x86_64-disc2.iso
Fedora-12-x86_64-disc3.iso
Fedora-12-x86_64-disc4.iso
Fedora-12-x86_64-disc5.iso

files. I then downloaded "Fedora-12-x86_64-CHECKSUM" and ran sha1sum.exe on my iso files and compared the results. They were wrong for all 5 iso files. Figuring there was a problem with the way I was trying to evaluate the checksum I burned a CD with the disc1.iso. I received a "INSERT A BOOT DISK" error from my machine. I then tried downloading the disc1.iso again and ran checksum on my newly downloaded file and get the same checksum on both the old and new disc1.iso files.

When I run:

I get the response:

It seems to me the checksum value should be:

What am I doing wrong? I've installed many different distros in the past and am pretty sure I burned the iso file not just copied it to the CD.

View 4 Replies View Related

OpenSUSE Network :: Using Nessus To Evaluate Security Of Web Server?

May 7, 2010

I am using nessus to evaluate the security of a web server. I have started up the nessus daemon on the server, here's the netstat output:

Code:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:ldap *:* LISTEN 3565/slapd
tcp 0 0 *:mysql *:* LISTEN 4026/mysqld
tcp 0 0 *:pop3 *:* LISTEN 3584/xinetd
tcp 0 0 *:sunrpc *:* LISTEN 3463/portmap
tcp 0 0 *:www-http *:* LISTEN 13855/httpd2-prefor
tcp 0 0 *:ssh *:* LISTEN 3577/sshd
tcp 0 0 *:nessus *:* LISTEN 6118/nessusd: waiti
tcp 0 0 *:smtp *:* LISTEN 3636/master
tcp 0 0 *:https *:* LISTEN 13855/httpd2-prefor
udp 0 0 *:sunrpc *:* 3463/portmap

It's listening on the default nessus port 9390. I am trying to connect to the nessus server instance using Open-VAS Client. I have generated the client and server certificates, I have pointed the client at the User Certificate File, the User Key File and I have a CA cert. I have created a user account on the nessus server. The problem is that when I try and log in from the Open-VAS client it keeps saying it can't connect. Is there anywhere I can check to see if it's being caught in a firewall, or where I can see if the connection is even making it to the server..

View 4 Replies View Related

Ubuntu Servers :: Evaluate What Started The MySQL Daemon?

Oct 13, 2010

I installed MySQL on my Ubuntu 10.04 desktop. As I need it only once a month I removed it from all runlevels but mysql is still running after boot up. "lsof" shows that it is running and listening for connections.

Code:
neo@ubuntu:~$ sudo lsof -i
[sudo] password for neo:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sshd 927 root 3u IPv4 7819 0t0 TCP *:ssh (LISTEN)
sshd 927 root 4u IPv6 7821 0t0 TCP *:ssh (LISTEN)
avahi-dae 945 avahi 12u IPv4 8107 0t0 UDP *:mdns
avahi-dae 945 avahi 13u IPv6 8108 0t0 UDP *:mdns

[Code]...

How can I evaluate what started the MySQL daemon? WHy is it running?

View 1 Replies View Related

General :: Referance To The Bash Shell / Use The Test Command To Evaluate?

Nov 8, 2010

Cis 140 student.how to use the test command to evaluate whether the shell variable I create contains a referance to the bash shell? and use the echo command to determine the result.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved