Questions tagged [passwd]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

Server ip with multiple domains / but only 1 user on /etc/passwd

I have access on a server that is running multiple domains on it, but when i check the /etc/passwd file i see only 1 user available ? is it mean that each user have his own linux instalation ? virtual ...
2
votes
1answer
96 views

How can I start a login shell with options?

I am messing around and want to have a guest user whose login shell is a restricted one like rbash. Unfortunately there is no rbash executable anywhere on my Slackware installation, so I have to do ...
1
vote
1answer
26 views

how to disable “Retype new password” when changing password in RHEL/CentOS

Is there a configuration setting in RHEL/CentOS thru which Retype new password can be disabled while changing user password? In shell we can use echo 'username:newpassword' | chpasswd I have to set it ...
0
votes
1answer
26 views

Why are there two root and nobody accounts according to “getent passwd”?

The output further down was retrieved by employing machinectl on a Ubuntu 20.04 host: machinectl pull-tar https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-root.tar.xz focal ...
-2
votes
1answer
53 views

What are the numbers in /etc/passwd? (and is there a way to find answers to these kind of questions without searching the internet)? [closed]

If i run grep user /etc/passwd, i get the string user:x:1021:1021::/home/user:/bin/bash. What does the numbers "1021:1021" mean? And is there a offline way to find what these mean? If i do ...
0
votes
0answers
24 views

/etc/passwd minicom as the user shell with parameters

I have an application that I need to constrain the user to operate a serial console. This works perfectly fine: myuser:x:1005:1005:Someone,,,:/home/myuser:/usr/bin/minicom However, I realize that I ...
1
vote
1answer
33 views

kali user password not saved after reboot

I am running Kali on a persistent USB (in a nvme enclosure) and it works fine. But when i do "passwd aUserName" log out and back in, the new password is used like it should. However when i ...
3
votes
2answers
305 views

Why can't I get a unique list of shells? [duplicate]

Trying to get a unique list of shells on my system. When I run this command: cat /etc/passwd | cut -d ':' -f 7 | uniq I get: /bin/bash /bin/sync /sbin/shutdown /sbin/halt /bin/bash I can't ...
0
votes
1answer
31 views

Need help with a script that uses passwd and shadow

I would like assistance with something I have to do. I need to verify if all users in passwd are also in shadow, if the primary group exists, if the homedir exists and if it belongs to the correct ...
1
vote
1answer
52 views

Cannot login as a regular user on FreeBSD

This user is a unpriviledged SFTP access user on our server, it was used during the stay-home order earlier this year due to Covid19, and I'm using it today to prepare some work for use tomorrow. ...
0
votes
0answers
26 views

Allow user to change all the passwords on the host

How can I give some user, e.g. jack, permission to edit all the passwords for all users on a host? I have added jack ALL=/bin/passwd /etc/shadow ALL in /etc/sudoers file (alternatively using visudo ...
0
votes
1answer
168 views

How to uninstall Google Authenticator and reset Root Password?

I recently made my own VPN Server (OpenVPN) on my Linux Debian vServer. Now, in order to make it more secure I figured it would be a good idea to add 2-Factor-Authentication. So installed Google ...
1
vote
1answer
175 views

Why does Kali Linux have other existing users from /etc/passwd file? I never created these users

I simply wanted to see my user that I just created in the terminal but I came across this sea of users in my existing Kali Linux vm. The command I used displayed a list of users. It started with "...
1
vote
1answer
118 views

Correct way to create users without home (for shadow.service)

If you create a user without a home on Arch Linux with useradd -M test, an entry like the following is created in /etc/passwd: test:x:1001:1001::/home/test:/bin/bash But because /home/test doesn't ...
1
vote
1answer
45 views

Is it possible to stop users from changing their passwords with PAM?

How can I stop users form changing their passwords with PAM? Is this possible? PAM can enforce password strength and the like, but it can reject all changes?
0
votes
1answer
28 views

Shell for only changing password

I need to restrict all access to a user on a RHEL 8 system and allow them to only change their own password. I thought that I could do [root]$ usermod <username> -s /bin/passwd but this is not ...
0
votes
1answer
299 views

Fedora 32/33 - Remove password strength enforcement

Fedora 32/33 wont let me select a short password for root and user. In this case i want to allow it, but i cannot do so: ❯ sudo passwd Changing password for user root. New password: BAD PASSWORD: The ...
0
votes
0answers
30 views

adduser name password set to a different user

I am root user and added a new user to the system with adduser username and set the password. I left my server for a half or or so and I come back and press the escape key "wake it up" I go ...
0
votes
0answers
44 views

order in passwd and shadow file

In order to implement some parser and eventually some tool to write to /etc/passwd and /etc/shadow on linux, I'd like to know if I can assume that the users in the files are guaranteed/or mostly in ...
0
votes
1answer
123 views

/etc/passwd.org, /etc/group.org, /etc/shadow.org files

On a Debian 10 server, which started as Debian 7 and updated whenever new version came out, I accidentally found these three files: /etc/passwd.org, /etc/group.org, /etc/shadow.org The backup files /...
3
votes
0answers
38 views

force specific shell environment variable on process using /etc/pam.d/ rules

I am using slim login manager, and it has its own pam rules file: /etc/pam.d/slim. auth requisite pam_nologin.so auth required pam_env.so readenv=1 auth required pam_env....
1
vote
0answers
17 views

force slim login manager to use /bin/sh to execute scripts, instead of user shell specified in /etc/passwd

I am using slim login manager, and openbox window manager. I believe, the startup sequence has these steps: 1) root: /etc/init.d/slim 2) root: /usr/bin/slim 2) user: /usr/bin/slim 3) user: ...
1
vote
0answers
177 views

Why would 000 on /etc/shadow permissions lead to me not being able to use passwd?

Basically, I decided to change the password on the VM I use for work which runs CentOS 7. Entering a new password in literally every case (user runs passwd himself, user sudos passwd, sudo su and then ...
1
vote
0answers
57 views

passwd -d can't remove password of user?

I created a new user to access a network share which I want to give no password. I ran useradd share and then sudo passwd -d share. passwd tells me that the password expiry information changed. If I ...
1
vote
1answer
153 views

User with privilege to manage other users' password EXCEPT root's

I am trying to give user a privilege to change other users' passwords, BUT excluding root's password. I have edited the /etc/sudoers file with visudo and appended the following line: myuser ALL=/...
0
votes
3answers
965 views

Is a comment line allowed in /etc/passwd

I know, in RHEL 7.8, that you can have blank lines in /etc/passwd But can you have comment lines, and if so what would the line start with?
1
vote
2answers
233 views

Cannot use sudo su after I changed my password

I am running Ubuntu 14.04 LTS. Yesterday, I changed the password on my user account, which is an admin account. This morning, I discovered that I can no longer use sudo su to switch to root. I know ...
1
vote
1answer
166 views

Can you edit /etc/passwd on a firmware image?

I'm trying to gain root access on a cheap DVR that I bought for a CCTV system. The manufacturer has a firmware update image available for download that I was able to inspect using a tool called ...
0
votes
0answers
55 views

FreeBSD - Change user password after SSHing into a Server

I would like to change the user password after having SSHed into a server, but get the following error: passwd Changing local password for passwd: pam_start(): System error What is the ...
0
votes
1answer
38 views

How to display a system account with the highest user id

root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/...
1
vote
3answers
287 views

SFTP server with third party user management system?

I understand how to set up SFTP servers on Linux and create users and their passwords manually. So basically, the users get authenticated as normal Linux users get authenticated through /etc/passwd. ...
3
votes
1answer
148 views

What encryption mechanism is used to store passwords in `/etc/shadow` in a typical Unix, such as Gnu/Linux?

(From a novice's point of view) The other day I was thinking about how a typical "passwd" command works in a LINUX OS. For example, when we type in "passwd", a prompt appears letting us type in our ...
0
votes
2answers
78 views

Printing information about a specific user from /etc/passwd

So I'm trying to list a bunch of info about users in etc/passwd. So far I managed to it so that the script writes out all users starting from uid 1000. I need another function to write info about a ...
0
votes
3answers
2k views

changing *your* linux password via a bash script

It's easy enough to change another users password via a bash script - just do echo newpw | passwd username and bam, you're done. But what about changing your password via bash? echo newpw | passwd ...
1
vote
1answer
541 views

Linux - create user with no password (login without password prompt)

I found many articles mentioning that user has no password after using passwd -d. While on some of my systems it indeed works (I can su from unprivileged accounts to them without giving password) on ...
0
votes
0answers
94 views

Bash script to make passwordless connection

I want to make passwordless connection with help of bash scripting. The requirement is that user has to just provide password. Point to be considered: 1) There is no generated public/private key in ...
3
votes
1answer
103 views

Why does /etc/shadow uses user name instead of uid?

/etc/shadow contains the username, but not the uid. Is there a specific reason, why a char * field was chosen over an int? For direct username->password check this might be quicker, but for ...
1
vote
1answer
223 views

how do I changed the password policy in LibreElec

I believe LibreElec is using some form of BusyBox. I've done lots searching and been unable to find where password rules can be changed. Since my LibreElec media player is not connected to the ...
1
vote
1answer
497 views

What are the default permissions on the Debian /etc/passwd file?

What are the default permissions for /etc/passwd on Debian distributions?
1
vote
1answer
530 views

passwd command not changing the current user password

I have tried with command: $ passwd It is asking new password and give success message but when I try to login with new password after restart the system. It work with old password. New password not ...
0
votes
1answer
202 views

Screen Lock Checks password file but not Active Directory

We have a Linux system running Centos 7 and have an issue with the screen lock. We have a multi-user environment where each user has their own account. The authentication is using our university ...
0
votes
1answer
2k views

how to disable password complexity check for centos 8

I have freshly installed centos 8 on my PC. I want to keep my old user password. Centos complains, it is too short (7 chars) and is based on some dictionary word. How can I disable this check?
1
vote
1answer
86 views

Finding the most common name in passwd file [duplicate]

I have a question on getting the most common names in the /etc/passwd file on Unix. Is this the correct command?: cut -d: -f5 /etc/passwd | uniq -c | sort -i | sort -n
1
vote
1answer
471 views

Automatically Run Multiple Command over SSH on multiple devices

I have 100+ devices that has same username and password and enabled SSH. What I would like to achieve is for each device I want to run same command to change their password bulk. What I did is to ...
4
votes
1answer
592 views

What is the practical difference between locking and deleting a user password?

The accepted answer to How do I completely remove root password suggests passwd -d root ("deleting" the password), and a comment suggests instead using passwd -l root ("locking" the password). The ...
37
votes
3answers
7k views

When did Unix stop storing passwords in clear text?

When did Unix move away from storing clear text passwords in passwd? Also, when was the shadow file introduced?
0
votes
1answer
374 views

Specify a home directory path for a user in /etc/passwd with spaces in it?

I have a path I want to use as a home directory in WSL, but it's also path that has spaces in it. I've tried escaping the spaces with slashes, and I've tried using single and double quotes with just ...
1
vote
1answer
188 views

Ampersand in the passwd GECOS field

When expanding the /etc/passwd GECOS field to get the user's full name, should we expand only the first ampersand (& character), or all ampersands? In a GECOS field with comma (,) delimited ...
-2
votes
1answer
65 views

Beeing root but without knowing password. Replacing binaries in /bin/ to bypass restrictions

I have an active root account, but I don't know my password. To be able to change my password or even to create another users (with the tool passwd) I need to know my password. So that creates a ...
1
vote
1answer
3k views

Get users with UID >= 1000 from /etc/passwd

I am trying to get usernames from /etc/passwd if UID equal/greater than 1000 using a for loop. The below simple bash script works but prints the username twice for some reason. #!/bin/bash for ...