View previous topic :: View next topic |
Author |
Message |
dfuse Guru
Joined: 07 Apr 2003 Posts: 395 Location: Belgium
|
Posted: Sat Dec 13, 2003 9:47 pm Post subject: how do I find out the uid of a user? |
|
|
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 |
|
|
Arno Tux's lil' helper
Joined: 19 Oct 2002 Posts: 126 Location: France
|
Posted: Sat Dec 13, 2003 9:55 pm Post subject: |
|
|
/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 |
|
|
ikaro Advocate
Joined: 14 Jul 2003 Posts: 2527 Location: Denmark
|
Posted: Sat Dec 13, 2003 10:01 pm Post subject: |
|
|
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 |
|
|
dfuse Guru
Joined: 07 Apr 2003 Posts: 395 Location: Belgium
|
Posted: Sat Dec 13, 2003 10:02 pm Post subject: |
|
|
aaaaaaaaah id user, that's useful, thanks alot! |
|
Back to top |
|
|
|