Rhel user admin

Embed Size (px)

Citation preview

  • 7/28/2019 Rhel user admin

    1/2

    The smbcontrol program sends control messages to running smbd or nmbd daemons. Executing

    smbcontrol -i runs commands interactively until a blank line or a 'q' is entered.

    The pdbeditprogram manages accounts located in the SAM database. All backends are supported

    including smbpasswd, LDAP, NIS+, and the tdb database library.

    To list all the user accounts present in the users database. This prints a list of user/uid pairs separated by

    the ':' character. Example: pdbedit

    L output sorce:500:Simo Sorce samba:45:Test User

    This option enables the verbose listing format. It causes pdbedit to list the users in the database,

    printing out the account fields in a descriptive format. Example: pdbedit -L -v

    output

    username: sorce

    user ID/Group: 500/500

    user RID/GRID: 2000/2001

    Full Name: Simo Sorce

    Home Directory: \\BERSERKER\sorce

    HomeDir Drive: H:

    Logon Script: \\BERSERKER\netlogon\sorce.bat

    Profile Path: \\BERSERKER\profile

    This option sets the "smbpasswd" listing format. It will make pdbedit list the users in the database,

    printing out the account fields in a format compatible with the smbpasswd file format. (see the

    smbpasswd(5) for details) Example: pdbedit -L -w

    To add a user into the database needs a user name specified with the -u switch. When adding a new

    user, pdbedit will also ask for the password to be used. Example: pdbedit -a -u sorce

    new password:

    retype new password

    smbmount //wakko/html /mnt/html -o username=kristinPassword:

    Mount -t smbfs username=kristin

    The smbpasswd program manages encrypted passwords. This program can be run by a superuser tochange any user's password as well as by an ordinary user to change their own Samba password.

    The smbstatus program displays the status of current connections to a Samba server. The testparm program checks the syntax of the smb.conf file The testprns program checks if printername is valid and exists in the printcap. If the printcapname is

    not specified, the default specified in the Samba or printcap configuration files is used.

    The wbinfo program displays information from the winbindd daemon. The winbindd daemon mustbe running for wbinfo to work.

    How to Display hashing Algorthm (for passwd encryption) used in your Linux Machine?

    [root@localhost ~]# authconfig --test|grep hashing

    password hashing algorithm is md5

    Above command clearly shows that, at present the algorithm used by your Linux machine is md5(Which

    will be used for all the user's by default).

  • 7/28/2019 Rhel user admin

    2/2

    How will you configure your Linux machine to use SHA-512 hashing algorithm?

    [root@localhost ~]# authconfig --passalgo=sha512 --update

    Please note the fact that unless you change the password of your users, SHA-512 hashing algorithm will

    not be updated for already existing users.

    Two steps to creating a user. First well run the smbpasswd utility to create a samba password for the user.

    # sudo smbpasswd -a or

    # sudo gedit /etc/samba/smbusers Add in the following line, substituting the username with theone you want to give access to. The format is = . You can use a

    different samba user name to map to an ubuntu account, but thats not really necessary right now.

    =

    Now you can create samba shares and give access to the users that you listed here.