Skip to main content

Questions tagged [passwd-file]

Questions about the file `/etc/passwd`. Contents, manipulation and recovery.

Filter by
Sorted by
Tagged with
35 votes
2 answers
7k views

Why is everybody so concerned about etc/passwd?

Here is the content of my vagrant machine of this particular file: root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin/nologin sys:x:3:3:sys:/...
funguy's user avatar
  • 493
25 votes
6 answers
7k views

Personal computer hacked: How do I block this user from logging in again? How do I find out how they are logging in?

I am 99.9% sure that my system on my personal computer has been infiltrated. Allow me to first give my reasoning so the situation will be clear: Rough timeline of suspicious activity and subsequent ...
Rosemary S's user avatar
22 votes
5 answers
23k views

I deleted the "/etc/passwd" file and cannot log in

I was trying to change my username and also my home directory (/home/username) and my system started to crash. I deleted the passwd file but I had a backup named passwd_bkp. I tried to rename this ...
joao rodrigo leao's user avatar
14 votes
3 answers
7k views

Why is there a shell given to user for PostgreSQL?

cat /etc/passwd |grep postgre postgres:x:115:127:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash apt-cache show postgresql Package: postgresql Priority: optional Section: database ...
Smile.Hunter's user avatar
  • 8,395
11 votes
3 answers
36k views

How to add user without useradd command?

Is it possible to add a user in ubuntu linux without useradd command I think its possible by adding the entries in /etc/passwd and /etc/shadow but i don't know the exact steps to do it and the user ...
Vishwanath Dalvi's user avatar
7 votes
1 answer
519 views

Trusting non human users

When looking into /etc/passwd and /etc/shadow I found many non human users. I read a bit about it and know what they do (as a group, though specifically I see many I have no clue about). All of them (...
Jesper's user avatar
  • 95
6 votes
1 answer
11k views

Where is the username and password stored?

Just for my curiosity, where is the username and associated password stored in Ubuntu? And how it is verified at the login time?
Tachyons's user avatar
  • 17.3k
6 votes
1 answer
2k views

Who is debian-tor in my /etc/passwd file?

I have found this entry in /etc/passwd: debian-tor:x:117:123::/var/lib/tor:/bin/false But there is no /var/lib/tor folder. This is on a server not a desktop.
fndtn357's user avatar
  • 163
6 votes
1 answer
5k views

Replacement for non-interactive "chpasswd -e"?

On older Debian machines one could issue something like: echo '<username>:*'|chpasswd -e in order to change the password field of the user (<username>) to *. Now I am aware of passwd -...
0xC0000022L's user avatar
  • 5,722
5 votes
1 answer
7k views

Unable to change user password in Ubuntu 12.10

The User Password is not changing for some reason. In the terminal it says password updated successfully, $ sudo passwd [sudo] password for zaigham: Enter new UNIX password: Retype new UNIX ...
Laphanga's user avatar
  • 307
5 votes
2 answers
19k views

sudo useradd: cannot lock /etc/passwd; try again later (no lock files)

When doing this on Ubuntu server 14.04: camilstaps@localhost:~$ sudo useradd --home-dir /var/www/xxx.camilstaps.nl/ --no-create-home --root /var/www/xxx.camilstaps.nl/ --shell /bin/sh xxx I'm getting ...
user avatar
4 votes
1 answer
32k views

useradd: cannot lock /etc/passwd; try again later

Trying to add a user: useradd -c "test" -d /home/bbbbbbbb -e "01-jan-2013" -f 10 -g admin -p secretfgjdhdgd -s /bin/bash -u 123456 blobblob but getting: useradd: cannot lock /etc/passwd; try ...
Michael Durrant's user avatar
3 votes
3 answers
31k views

How to recover a deleted /etc/passwd file? [duplicate]

I deleted the /etc/passwd file and cannot login now. I don't know the root password and tried lots of passwords, but none of them worked. How can I fix this?
Eren's user avatar
  • 41
3 votes
3 answers
11k views

How to change my UID back in passwd file?

My OS is Ubuntu 12.10, and my account is called acgtyrant, and its UID is 1000. For the need of researching, I changed my UID from 1000 to 1010 in /etc/passwd, and then I found my files' master ...
acgtyrant's user avatar
  • 185
2 votes
3 answers
2k views

Locked out after using usermod

After trying to change my password with usermod -p <new password> <username> ( which seemed to work but didn't give any messages ) I found I could not log in using either my old or new ...
Andrew Coomes's user avatar
2 votes
1 answer
8k views

Do I need user 1000, and can I replace it?

On my computer running Mythbuntu, I'm having a problem where some important processes are being run by a user called 1000. $ ps -aux | grep myth Warning: bad ps syntax, perhaps a bogus '-'? See http:...
Questioner's user avatar
  • 6,869
2 votes
1 answer
39k views

Why do I keep getting "invalid password" when trying to log in?

I have read and tried everything that I can find and I am still having issues logging in. I have Ubuntu 11.10 that I have put on my machine a couple of weeks ago and I still cannot log in. It says ...
Novak's user avatar
  • 21
2 votes
1 answer
1k views

Postfix+Dovecot Unix user authentication

I want to set up a mailserver with postfix+dovecot+roundcubemail. And I don't want virtual users. Is it possible to use Unix users and somehow just include the /etc/passwd file for authentication/...
Reallinx's user avatar
2 votes
1 answer
774 views

Ubuntu User Accounts messed up

I need to fix Ubuntu Accounts but somehow don't really see how it could be done. The problem is: files /etc/passwd and /etc/hostname and /etc/hosts where changed. /etc/passwd After John:x:1000:...
Vor's user avatar
  • 177
2 votes
0 answers
192 views

I (unintentionally) deleted (I guess) a passwd file

I was trying to install x11vnc to screen share my laptop through the terminal. While I was doing it, x11vnc asked me to add a password and so I did. Then I needed to open another terminal and it ...
Cristián Hernández's user avatar
1 vote
1 answer
844 views

Getting Full User Name Wrong

Why when I issue a command like: awk -F: -v U="$LOGNAME" '$1==U{print $5}' /etc/passwd or grep $USER /etc/passwd | awk 'BEGIN { FS=":" } { print $5 }' is displayed Diogo Saraiva,,, instead of ...
DiogoSaraiva's user avatar
1 vote
2 answers
4k views

useradd: cannot open /etc/passwd

I am facing create a new user on my ubuntu 20.04 from GUI as well as terminal. I am getting following error: sahadeb@HP-Elite-Book:~$ sudo adduser user1 Adding user `user1' ... Adding new group `user1'...
sahadeb barman's user avatar
1 vote
1 answer
2k views

different mailbox formats for special dovecot/system users

On a server me and a friend set up we're currently using mbox mailbox format. (Think I should mention that my friend set up the mail part of the server and I yet don't know too much about mailserver ...
Roland Kohn's user avatar
1 vote
0 answers
43 views

Why does Ubuntu include accounts for packages that aren't installed?

Why does Ubuntu include accounts for packages that aren't installed (such as gnats, irc,...)? Seems the accounts should be created as needed when the packages are installed, not sitting there in the ...
John's user avatar
  • 19
1 vote
0 answers
243 views

Is it possible to place a file in /target before install starts, using a preseed?

I'm using a preseed to install my system. However, I'd like to place existing passwd and group files in /target/etc, after partitioning, but before the install starts. Any ideas?
ChuckYouFarlie's user avatar
1 vote
0 answers
1k views

Safely edit fstab and passwd files

I remember hearing that there were wrapper tools to help editing /etc/fstab and /etc/passwd to do basic syntax checking (eg a newline at the end of the file). My google-fu isn't turning them up... ...
Tom Hale's user avatar
  • 3,528
1 vote
0 answers
573 views

Delete a duplicate username?

My ubuntu login screen shows two accounts with my username. I am only able to log into one of them, and I have no idea where the other one came from or what the password is. My /etc/passwd file shows ...
pixelpax's user avatar
  • 111
1 vote
0 answers
274 views

Cycles through black screen on login after changing password [duplicate]

On my laptop, I forgot the password to my Ubuntu partition, so I logged into the root command shell on the recovery start up option in GRUB so that I could change the password. On my first attempt to ...
John L's user avatar
  • 11
0 votes
1 answer
906 views

How to get the details of User(Computer)name and the Password?

Where the details of Password and Username/Computer Name being Stored in Ubuntu 14.04? How to Change the Password and the Username? Ways to recover the forgotten Password and the Username without ...
Madhusudhanan's user avatar
0 votes
1 answer
551 views

How to update field of /etc/passwd?

I want to update some contact information in /etc/passwd. It's the 5th field, shown as "user info" in the following example username : x : uid : gid : user info : home directory : shell It looks ...
Cecilia's user avatar
  • 133
0 votes
1 answer
105 views

default username gone only can login as guest (16.04)

Today I did a stupid thing. I used sudo gedit /etc/passwd changed x:1000:1000:kai:/home/linuxidc:/bin/bash this from 1000 to 0. Then after I restart only can login as a guest. No default username ...
kindlong's user avatar
0 votes
1 answer
50 views

Why the GECOS column at /etc/passwd represents 4 empty fields and not 5 according with the adduser command?

Just being curious about the following situation When the adduser command is executed as follows: sudo adduser optimusprime Adding user `optimusprime' ... Adding new group `optimusprime' (1015) ... ...
Manuel Jordan's user avatar
0 votes
1 answer
602 views

Cannot login to Ubuntu after changing home directory

I recently tried changing my home directory from /home/henry to /hdd/home/henry using viwp passwd. /hdd is a separate hard drive. I then rebooted the system but I cannot log in. I get the login ...
HenryM's user avatar
  • 187
0 votes
3 answers
2k views

delete all users from group

In ubuntu, how do you delete all users from a group using the bash command line? The group is called grp1 and it's at /etc/group It don't care whether the actual group remains or not. I just want the ...
american-ninja-warrior's user avatar
0 votes
1 answer
7k views

etc/passwd cannot be found [closed]

I can't find the etc/passwd file on my Ubuntu computer. I know I shouldn't try to mess with it now, but when I was I couldn't find it. Yet I can still access my computer. Did they hide it in the 14....
Kyle Calica-St's user avatar
0 votes
1 answer
658 views

Is this shadow file normal or hacked?

I may have been hacked. This is most of my /etc/shadow file. I can't understand why so may items have a password hash of "x". Does "x" have a special meaning? Or is it really a hashed password, ...
Aethelbald's user avatar
0 votes
1 answer
258 views

passwd file deleted in ubuntu

i was recently making some researches about the passwd file, and out of curiosity i deleted it, after i deleted it my computer froze, and after a hard reboot it doesnt boot. i found a solution on this ...
Salman's user avatar
  • 1
0 votes
1 answer
37 views

Does the superuser in grub.cfg have to be real?

Kind of an odd one here - I'm following these instructions to password protect my GRUB menu. Part of the process is adding the below to /etc/grub.d/40_custom, which is later added to grub.cfg: set ...
SuperDialga's user avatar
0 votes
0 answers
77 views

What is the correct approach to unlock a disabled login user?

When is executed the sudo adduser <username> --disabled-login command, is created an user being locked because is disabled login. It can be confirmed with the passwd -S <username> command ...
Manuel Jordan's user avatar
0 votes
1 answer
151 views

I have another user than root with UID 0

I'm running a VPS which I have forogtten for quite a while. It was still running Ubuntu 18. I logged in today an saw that apparently the server was hacked, it was running a cryptominer and stuff. So I ...
Brettetete's user avatar
0 votes
0 answers
1k views

How can I prevent unprivileged users from accessing /etc/passwd, /etc/group, etc

As the title suggests, I have a multi user environment, and in the interest of protecting privacy, I'd really like to be able to restrict users access to some of these publicly viewable files that ...
Jack_Hu's user avatar
  • 354
0 votes
1 answer
118 views

Ubuntu 14.04 not booting on main user after name change

So I wanted to change the name of the home folder, and did so using the mv command: mv /home/oldname /home/newname. It worked fine. No errors appeared until I tried accessing the home folder. It said ...
bf beats cod's user avatar
0 votes
2 answers
1k views

how to delete a user from ubuntu with the same uid of myuser

There is an option to have more than one user on your linux box and use them for different task. So, basically, I used it sometime to have different instance of application for different projects. For ...
eSadr's user avatar
  • 101