LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to create an account for the CLI and for Samba (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-create-an-account-for-the-cli-and-for-samba-748183/)

anon091 08-17-2009 11:54 AM

How to create an account for the CLI and for Samba
 
I'm creating my first account today. It needs to be able to SSH into the CLI then access Samba shares. Is the following how you do it? I found this on the web but aren't sure. Also, how do you set the password for the account?

useradd -d /home/username -s /bin/bash -n username
smbpasswd -a username

lleb 08-17-2009 01:13 PM

for witch account? the samba user? if that is your question you are adding the password with smbpasswd.

If you mean for the adduser or useradd, both do the same thing, after you create the account/user just type user passwd and hit enter. it will prompt you for the old password then for you to type in the new password 2x in a row.

centosboy 08-17-2009 01:43 PM

Quote:

Originally Posted by rjo98 (Post 3646779)
I'm creating my first account today. It needs to be able to SSH into the CLI then access Samba shares. Is the following how you do it? I found this on the web but aren't sure. Also, how do you set the password for the account?

useradd -d /home/username -s /bin/bash -n username
smbpasswd -a username



useradd <user>
passwd <user>


smbpasswd -a <user>
smbpasswd <user>


of course, there are ways to automate all of this if needed

onebuck 08-17-2009 04:49 PM

Hi,
Quote:

Originally Posted by rjo98 (Post 3646779)
I'm creating my first account today. It needs to be able to SSH into the CLI then access Samba shares. Is the following how you do it? I found this on the web but aren't sure. Also, how do you set the password for the account?

useradd -d /home/username -s /bin/bash -n username
smbpasswd -a username

If your user needs root access then utilize 'su' will allow the user to utilize as long as they/you have the password. If you want to restrict the user, best way then would be after you create the user you edit the '/etc/sudoers' file;

Quote:

excerpt from 'man sudoers';

sudoers - list of which users may execute what

DESCRIPTION
The sudoers file is composed of two types of entries: aliases (basi-
cally variables) and user specifications (which specify who may run
what).

When multiple entries match for a user, they are applied in order.
Where there are conflicting values, the last match is used (which is
not necessarily the most specific match).



All times are GMT -5. The time now is 04:03 AM.