unix/mac questions about password changes or storage, the related `.passwd` file or `passwd` command
Questions tagged [passwd]
140 questions
1
vote
0 answers
How does EncFS extpass work
Programs like encfs or git have an option where in we can set an external application to get the password for them.
My question is twofold:
What are the necessary characteristics for these external programs? That is to say, once they read the…

Marcus
- 1,685
- 1
- 18
- 33
1
vote
1 answer
loop passwd in shell script
how can i make a loop for users of server using shell script
i wrote this code ..
#!/bin/bash
b=`awk -F: '{ print $1 }' /etc/passwd | sort`
for $b in /home/$b/ /home/$b/ /home/$b/
echo "$b"
done
i want to loop all users and show its
the users…

saba
- 35
- 1
- 10
1
vote
1 answer
Create a function to get a username using a try and catch method in C++
I'm trying to create a function to get a username using a try and catch method in C++. Unfortunately this code doesn't work, and my application closes when it tries to run.
QString UserInfo::getFullUserName()
{
DBG_ENTERFUNC(getFullUserName);
…
user5040767
1
vote
2 answers
BASH search and print user, uid, last login
With my rusty bash skills, I'm trying to do the following:
Find all users that have a UID > 500
Print list of users including their username, comments, shell etc
Append the last login date to each of these users
So far I have this:
[user1@test2…

Dave
- 21
- 2
1
vote
2 answers
Script to Copy User according to UID
I'm looking for a way to copy all non-system users from one PC to another. I can get the group and passwd files copied over using this
awk -F":" ' $3 > 499 ' etc/passwd >> /etc/passwd
awk -F":" ' $3 > 499 ' etc/group >> /etc/group
But, how would I…

bradlis7
- 3,375
- 3
- 26
- 34
1
vote
0 answers
ldap client on aix systems - why does /etc/passwd need to finish with '+' one some systems
I need to integrate a couple of AIX servers into an existing LDAP directory for user authentication and authorization. Versions range from 5 to 7.1.
On some systems (I have yet failed to recognize a pattern) I need to finish the '/etc/passwd' with a…

user3741094
- 11
- 1
1
vote
3 answers
Scientific Linux: I need to take a shell script variable and use it to search in a awk script
#!/bin/bash
# This tells you that the script must be run by root.
if [ "$(id -u)" != "0" ];
then
echo "This script must be run as root!" 1>&2
exit 1
fi
userexists=0
while [ $userexists -eq 0 ]
do
# This asks for the user's input for a username.
…

user3626271
- 5
- 1
1
vote
5 answers
Grep Shadow File Meaning
Will someone please help me what is the output of the following code?
egrep -v '.*:\*|:\!' /etc/shadow |awk -F: '{print $1}'

Ace
- 420
- 2
- 8
- 25
1
vote
1 answer
Bash change password on boot
* QUICK SOLUTION *
For those of you visiting this page based on the title solely and not wanting to read through everything below, or thinking everything below doesn't apply to your situation, maybe this will help... If all you are looking to do is…

Atomiklan
- 5,164
- 11
- 40
- 62
1
vote
3 answers
Cannot Change Root Passwd
I know there have been a lot of posts about this, but cannot seem to find an answer that has worked for me.
I wanted to change the password of my root user, but have failed in doing so.
logged in as root;
root@ubuntu:/ passwd
passwd: Permission…

Vijit Jain
- 23
- 7
1
vote
2 answers
Cut lines of /etc/passwd of users of the same group
I want to cut the lines of /etc/passwd of users of the same group.
If my group have the uid 1009 I want all the lines of /etc/passwd of this…
user1984093
1
vote
1 answer
special character in linux shell
I changed a lot of linux machines with one command(run as root):
passwd <<EOF
!@#$!QAZ@WSX
!@#$!QAZ@WSX
EOF
when I logout and tried to login again, it told me that the password was wrong!!!!
I know the problem's with those special characters.…

Lu Jun
- 13
- 2
0
votes
2 answers
Getting password file entry for the current user
I have this in my source code:
struct passwd* user_info = getpwnam("root");
Is there anyway to change the "root" and my program will find the current user? For example if I am logged in with user root2 I want info for root2 and not for root.

BlackM
- 3,927
- 8
- 39
- 69
0
votes
0 answers
Using Plink to change user's password remotely
As I am in IT Admin job which requires managing Windows & Linux servers of an organization, the real pain is changing passwords. For Windows, I am able to change from Active Directory itself which syncs the passwords in real time; but the real…
0
votes
0 answers
Alternative to '/etc/group' through NSS
I would have said that libc should have a function (maybe something like getGroupsByUsername) that would return a list of all groups a user should be a member of, and that this function would be implemented by NSS. And then, the files service from…

Hobber
- 194
- 1
- 13