User Accounts - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

User Accounts

DantyDanty Posts: 322Member
what's the FreeBSD command for determing/viewing all user accounts on the system?

I created an accound and forgot the password, how do I get (i'm root too)

Comments

  • gautamgautam Posts: 642Member
    : what's the FreeBSD command for determing/viewing all user accounts on the system?
    :
    : I created an accound and forgot the password, how do I get (i'm root too)
    :

    The simplest way I know of checking if a user exists is to do a simple grep

    grep "username" /etc/passwd

    This will search the password file for the username. However the password is generally encrypted.

    If your only need is to change the password - you might want to look at this
    http://www.bsdi.com/bsdi-man?proto=1.1&apropos=0&msection=ALL&query=passwd

  • DantyDanty Posts: 322Member
    anyhow, in what file and where the encrypted password is stored?
  • gautamgautam Posts: 642Member
    : anyhow, in what file and where the encrypted password is stored?
    :

    I think that would be /etc/shadow

  • hooverhoover Posts: 2Member
    anyway,if i m not mistaken, root can use <$ sudo passwd (username)> to change the users passwd right? try it.. hp-ux can run it but i m not sure in freebsd
Sign In or Register to comment.