Results 1 to 2 of 2

Thread: smbpasswd question

  1. #1
    Join Date
    Jan 2013
    Beans
    3

    smbpasswd question

    Hi,

    Is it possible to somehow use the current logged in user and then just set the password?

    Code:
    sudo smbpasswd -a "current user"
    So if 'Bob' is currently logged in, Bob will be used and I will just have to create the Samba password for Bob. I'm trying to write a script to automate the process of installing Samba. Thank you for your time everyone!

  2. #2
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: smbpasswd question

    Quote Originally Posted by ubunnewbie View Post
    Hi,

    Is it possible to somehow use the current logged in user and then just set the password?

    Code:
    sudo smbpasswd -a "current user"
    So if 'Bob' is currently logged in, Bob will be used and I will just have to create the Samba password for Bob. I'm trying to write a script to automate the process of installing Samba. Thank you for your time everyone!
    The bash variable you need is $USER. If you use the echo command you will see the current logged in user. See the output of this
    Code:
    echo $USER
    -BAB1

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •