LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-17-2009, 12:54 PM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Rep: Reputation: 46
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
 
Old 08-17-2009, 02:13 PM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
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.
 
Old 08-17-2009, 02:43 PM   #3
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by rjo98 View Post
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
 
Old 08-17-2009, 05:49 PM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,542
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,
Quote:
Originally Posted by rjo98 View Post
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).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I create a mail account? Md.Abul Quashem Linux - Server 3 11-14-2008 09:01 AM
SAMBA: C an't create a machine account for domain lucktsm Linux - Networking 3 06-14-2006 09:04 AM
Create FTP account Swakoo Linux - Newbie 1 06-13-2005 07:16 AM
samba and kerberos (create a computer account in Win2k AD) shane200_ Linux - Networking 0 01-04-2005 10:27 AM
cannot create new user account kpachopoulos Linux - Newbie 4 08-17-2004 08:38 AM


All times are GMT -5. The time now is 04:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration