Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how do I find out the uid of a user?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dfuse
Guru
Guru


Joined: 07 Apr 2003
Posts: 395
Location: Belgium

PostPosted: Sat Dec 13, 2003 9:47 pm    Post subject: how do I find out the uid of a user? Reply with quote

Hey,
I need to know the userid of some users, usually I got them from the /etc/shadow file,but now all of a sudden they seem scrambled, for example:

nico:$1$HM2Ry5IG$FwKpiYnJX8UDslWzpItqx1:12152:0:99999:7:::

Is there another way to find out the uid of a user and is it normal that all of a sudden they are scrambled? It's only for the users I use, users like apache, distcc are not affected by this sudden change.
Back to top
View user's profile Send private message
Arno
Tux's lil' helper
Tux's lil' helper


Joined: 19 Oct 2002
Posts: 126
Location: France

PostPosted: Sat Dec 13, 2003 9:55 pm    Post subject: Reply with quote

/etc/shadow contains encrypted passwords.
/etc/passwd contains user and groud IDs. You can grep this file for the user:
Code:
$ grep arno /etc/passwd
arno:x:1000:100::/home/arno:/bin/bash

The 3rd field (the 1st number) is the user ID, the next one is the group ID.
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2527
Location: Denmark

PostPosted: Sat Dec 13, 2003 10:01 pm    Post subject: Reply with quote

you can also just type "id user"

Code:

ikaro@Genbox$id ikaro
uid=1000(ikaro) gid=100(users) groups=100(users),10(wheel),16(cron),18(audio),35(games)
ikaro@Genbox$

_________________
linux: #232767
Back to top
View user's profile Send private message
dfuse
Guru
Guru


Joined: 07 Apr 2003
Posts: 395
Location: Belgium

PostPosted: Sat Dec 13, 2003 10:02 pm    Post subject: Reply with quote

aaaaaaaaah id user, that's useful, thanks alot!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum