Questions tagged [passwd]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
15 views

Cannot login because corrupted /etc/passwd

I accidentally change one line of /etc/passwd to something like: foo:x:147:158::"/home/foo/#0.0.0.0:80/www":/usr/bin/bash ^ quoted because there's colon in the ...
0
votes
0answers
17 views

How to check the password age of Users from Active Directory

I am working on Linux (RHEL and SLES) and am not a Linux administrator and don't have access to a Linux administrator. The users are from Active Directory hence I am not able to find/reset the ...
1
vote
3answers
34 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. ...
2
votes
1answer
69 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
41 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
76 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
71 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
48 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
61 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 ...
0
votes
0answers
24 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
128 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
68 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
51 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
213 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
48 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
98 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 ...
2
votes
1answer
96 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
6k 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
102 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
102 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
58 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 ...
0
votes
1answer
439 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 ...
0
votes
2answers
105 views

What does the L returned from passwd --status mean

I was checking my password status and noticed that instead of NP or P there was a L returned so i checked the man pages and found it was a locked password could someone explain what this is to me?
4
votes
0answers
155 views

How to have synchronized samba passwords with local linux accounts where linux account are the leading system/authority?

How to have synchronized samba passwords with local Linux accounts where Linux accounts are the leading system/authority? This seems to be a surprisingly complex request/requirement. Since I already ...
7
votes
0answers
4k views

running git or ssh client in docker as user: No user exists for uid

Problem: I'm trying to run a git clone myuser@server:repo.git from within a docker container. Inside the container (due to policy) I am the same user as on the docker host system (non-root) and have ...
0
votes
1answer
206 views

auto enter password for `passwd <new user>` from script? [duplicate]

if the script was useradd ...............<new_user>; passwd <new_user>;. is there a way to put the new password in a script? I don't need to change or add an old password for an existing ...
3
votes
1answer
356 views

Why is +::0:0::: not supposed to be found in /etc/passwd?

I was reading the BSI Security Guidelines (GERMAN), on NIS and it explicitly mentioned that one should prevent the entry +::0:0::: from occuring in the /etc/passwd file of the NIS server. From my ...
0
votes
1answer
210 views

passwd command not working as expected

I am trying to change the password of my root and other users. When I try it using passwd it takes me to another prompt without asking the new password. As in: [root@southapp2 ~]# passwd [root@...
28
votes
1answer
3k views

Why would /etc/passwd be used every time someone executes `ls -l` command?

Read from APUE, just feel curious: The password file is used every time a user logs in to a UNIX system and every time someone executes an ls -l command.
1
vote
1answer
313 views

Is it safe to set password in /etc/passwd to * on Linux to prevent password login?

AFAIK, the second field of /etc/passwd can be x: password is in shadow hashed password What if I put a string less than 8 chars in the field? I do not want anyone to use password on this account.
0
votes
0answers
125 views

ubuntu cannot boot after modifying /etc/passwd

The following are the steps I destroyed my ubuntu: I installed Windows 10 and Ubuntu 18.04 in my computer; I modified the /etc/default/grub and set GRUB_TIMEOUT = 0, then I cannot see the Grub screen;...
0
votes
1answer
37 views

Is there a way to retrieve a root mysql password (no reset)

Is there a way to get back / retrieve a mysql root password. I mean get it back : not resetting it (I already know how to reset it and I use the reset method currently).
1
vote
3answers
76 views

Can a Solaris 11 account prefixed with # be used to login?

I have been given a list of accounts on a Solaris 11 server that contains several accounts which are prefixed with a # character: "#username". (No LDAP is being used, and all accounts are local ...
1
vote
0answers
83 views

!! versus * in /etc/passwd [duplicate]

My (admittedly dated) understanding of unix is that in /etc/passwd if the second field is 'x' then the identity can login with a passwd that matches a hash found in /etc/shadow. However, when I list /...
1
vote
1answer
432 views

About macOS: why my user not in sudoers file but I can use sudo privileges too?

In Linux, if the user that you created want to use sudo privileges, you should add this user to /etc/sudoers(add something like jack ALL = (ALL) ALL). Well, the default mac user(the one you login to ...
0
votes
1answer
314 views

Why does the primary group of my user show up in /etc/group?

I'm following a course about Linux and it states the following: "The primary group of a user is not mentioned in the /etc/group file." However, my primary user "timgeldof" actually does show up in ...
27
votes
2answers
4k views

What is the bin user for?

As I wrote at https://unix.stackexchange.com/a/484626/5132 this is worthy of its own Q&A. On Linux operating systems … % getent passwd bin bin:x:2:2:bin:/bin:/usr/sbin/nologin % … ...
1
vote
1answer
93 views

I cannot reset password using rescue mode

We have a problem on a centos 6 server. normally, PasswordAuthentication is off. When I get connected using rescue mode, I execute these commands : mount -o remount,rw / chroot / /bin/bash passwd ...
0
votes
1answer
161 views

Is passwd file always in /etc/passwd?

So, I'm writing a script that needs to modify the such a file but from the partition of a non booted OS (for example from a livCD to a OS installed on another drive) and I was wondering if, given I ...
1
vote
2answers
886 views

why do we need the SUID permission? [closed]

Please read this long intro to understand my concern for why we need the SUID permission for executable binary file. A process in Linux uses its EUID to know the effective User ID of itself. This ...
6
votes
3answers
351 views

How is the /etc/passwd file instantiated?

This is a weird question, but it strikes me as question a fish might ask about water. How is the /etc/passwd file created? Initially. Where I am coming from is this I'm a Linux sysadmin and have ...
1
vote
1answer
138 views

Where are supplemental groups coming from in /proc/pid/status, are they always inherited from a shell?

In /proc/pid/status we can see all the supplemental groups for the pid (My understanding is this is assuming it was forked from an interactive shell or the process did getgroups(2)) I want to know ...
0
votes
1answer
141 views

Why passwd prohibits me from setting “simple” password?

I used console command passwd to change my own password that I set straight after the OS installation with useradd command. My original password contained only line characters, without capitalization, ...
0
votes
1answer
293 views

awk print from passwd but only with userid > 1000

Ok I've done: cat /etc/passwd | awk -F: '{ print $1 }' -F ==> Specify a file seperator for delineating data fields in a line $1 ==> Represents the first field in the input but how to only print ...
1
vote
1answer
48 views

Can't log in to other users on a debian system

I can't log in to KDE, as other users to the GUI on my Debian systems only the user created at install. I can log on in the command line: su - user into the users login but only in the shell. I ...
-1
votes
3answers
2k views

what is the difference between /etc/shadow and /etc/passwd [closed]

What is the major difference between /etc/shadow and /etc/passwd In /etc/shadow we have the same data as in /etc/passwd.
-3
votes
1answer
487 views

How to change password in brand new Unix user

First ever question for me. Straight to the point. I've added a user: sudo useradd -m _homedir_ _username_ Tried all of these but nothing worked: passwd _username_ chpasswd username: _password_ ...
-1
votes
3answers
257 views

Can I change the SHELL on a running Oracle database?

I just started a new contract and have run into an issue I have never encountered before. Their Oracle database was started under a korn shell. oracle:x:500:100:Oracle user:/home/oracle:/usr/bin/ksh ...
1
vote
0answers
58 views

Samba, winbindd and multiple home directories

My current situation is a system with an Windows AD and DC, which manage logging in to Samba. After an Upgrade of the underlieing OS from Windows Server 2008R2 to 2016, my coinfig doesn't work anymore....
-1
votes
1answer
91 views

Configure IPSec so the user identity is passed to iptables rule

Hi I'm pretty new to this so you'll have to be very explicit. I set up IPSec on CentOS so that I can VPN. User identities are stored in the /etc/ppp/chap-secrets, mainly because that's how things ...