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 -
I have just got my Openldap server up and running howerver, I admit I'm a little confused about authenticating a client mechine to the server. When I create an account on the ldap server, does this mean that the server creates a user account in the /etc/passwd, or somewhere else on the server?
I can see the owner and group ids are shown because there are no corresponding entries in /etc/passwd and /etc/group respectively. I don't know much about linux and dare not to edit these files, I wonder if somebody already knows whether linux would map the owner id of files coming from other computers to the account name in /etc/passwd and display them when necessary (for example, when using ls -al)?
All servers mentioned below run OpenSuSE, either 10 or 11.I am currently working on a few scripts that are meant to be used as part of a continuous integration setup. I am trying to keep these scripts reasonably secure, and so I have made sure that all the servers run these scripts only as a specific user (user1) that has permissions to basically nothing else. The problem I am currently running into is that I need to start and stop tomcat as user1 but this user doesn't have permissions to the tomcat rectory (only tomcat has execute permissions). I have a temporary workaround in place while I work on the scripts (I have an SSH key in place that allows me to SSH from user1o tomcat without a password and execute my commands that way) but it is not very secure. I have tried adding the following line to /etc/sudoers:
Code: tomcat localhost = NOPASSWD: /opt/tomcat/bin/startup.sh, /opt/tomcat/bin/shutdown.sh but it doesn't work as I expected it to. I tried a few different syntaxes for that line,
we are trying to make a policy decision whether to go with SSH user/passwd or PPK secure key ? our servers are hosted remotely by a hosting service. we were wondering which of these two models are more secure.e.g. i would tend to think that user/passwd with account lockouts upon failed attempts would be more secure because the other option exposes your server in case someone sneaks the PPK file or steals your whole computer.however, what makes me doubt myself is that Amazon Web Services EC2 cloud hosting uses PPK by default (although an instance's SSH config can be change to accommodate logging in but they don't endorse it).
Is it possible to log in secure shell (openssh ) using a username and password which is not present in "/etc/passwd" .The shell created after authentication should be owned by the logged in user . Is it possible to store the user infromation like uid , gid , home dir , shell in some remote machine instead of /etc/passwd and then retrive the these these information when a session is created for the logged in user .
I am using Red Hat and was wondering how to disable username and password only login and require that a PPK secure key file be used for authentication ? I can log in using the secure private key and the public key that is in ~/.ssh/authorized_keys but i can still log in using the plain username and password login.
I started to work on building a ftp by vsftpd in our lab (that's only for our lab members). I am going to setup some the virtual users for each of the member. We have a CentOS5 (without upgrade after the fresh installation). I try several ways to setup the vsftpd for virtual users. 1) with db4 2) with mysql 3) without database and use htpasswd. But all fails. Actually, I don't want to use database, so I am going to find out the reason of failure on 'htpasswd' method
My vsftpd is installed in /etc/vsftpd (for only using ftp account, it is no problem to login).
1) I setup an account called vftpuser and build the corresponding home (/home/vftpuser), and then I setup another account call usera and also create a directory within /home/vftpuser.
2) I use htpasswd to add passwd to usera and store the passwd in /etc/vsftpd/passwd.
3) I added the name of usera to /etc/vsftpd/user_list
4) I create a directory /etc/vsftpd/user to store a unique conf for each user (for usera, the conf named usera) which contains the local root for users, which is
I am trying to write a remote access module. Is there any function in linux where I can give string (password entered by user) and compare it with the actual user password stored in /etc/shadow. Since the password is stored encrypted in /etc/shadow I cannot parse and compare. So I want some method to compare if my user entered the correct password..Is there any function for that..
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
If I configure a crontab like below.12 3 12 4 4 cat /etc/passwd I know that the cat command will get executed at the configured time. But where will the output of that command go?If it is something like below, then out put will be routed to /tmp/file1.12 3 12 4 4 cat /etc/passwd > /tmp/file1
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.
I'm running a small network of 20 PC's (slackware), I had previously used NIS and can't really be bothered with ldap it's a bit of hassle. I do not need a centralised database just a login auth system.On the server I make a folder called /sec and symlink passwd, group and shadow into it.I export this via nfs.On the workstation I create a folder /sec, move the passwd, group and shadow file into it and then symlink them back into the /etc folder.On bootup, the rc.local mounts server /sec over the top of workstation /sec. If it fails it falls back.I wasn't sure if I could just mount /sec on the workstation and then temporarily symlink group,passwd,shadow over the top of the /etc/shadow etc
I was looking around the files in /etc/ to see what they were and what they said, then I noticed there was two files called passwd, which confused me a lot for a second then I noticed one of them was actually passwd-.I compared them and they only differed by one line: < games:36:35:added by portage for gemrb:/usr/games:/bin/bash, which was in passwd but not passwd-.Should these files both exist? If yes, why, what does having both do? If no, then its safe to say I can just delete passwd-