LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-17-2014, 03:03 AM   #1
somnathndy
Member
 
Registered: May 2013
Posts: 31

Rep: Reputation: Disabled
Creating users by NEWUSERS command but system is not accepting


Hi,

I am creating users in RHEL 6.3 with "newusers" command. I have created text file identical to /etc/passwd file (exported from excell into txt and modified it) - which is containing around 600 users name(11characters), password(15 character), UID, GID(groups created separately), home dir, shell. After creation when I am trying to login through any of the newly created login IDs through login screen - after providing the password, screen is going blank and after few seconds it is again coming back to login screen - unable to login. Initially thought due to password length or user name length it is happening, but separately checked by creating user and password through GUI with same length and it is working w/o any problem. Please help.
 
Old 07-17-2014, 06:21 PM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Hey Somnathndy

A couple of questions.
users in RHEL 6.3 with "newusers" command. I have created text file identical to /etc/passwd file (exported from excell into txt and modified it)
When you less the file, do you see any characters you weren't expecting?
Did you grep /etc/passwd to see if the users were created (perhaps without working passwords)?
separately checked by creating user and password through GUI with same length and it is working w/o any problem.
Did you try just passing a file with a single new user on it, conforming to the format that is spelled out in the "newusers" manual page?
pw_namew_passwdw_uidw_gidw_gecos: pw_dirw_shell

Last edited by dijetlo; 07-17-2014 at 06:23 PM.
 
1 members found this post helpful.
Old 07-17-2014, 09:22 PM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Can you login using ssh? or using a virtual terminal (rather than a GUI login?).

If not, is the users home directory created (and with the correct UID/GID)?
 
Old 07-17-2014, 11:23 PM   #4
somnathndy
Member
 
Registered: May 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Hi dejetlo and jpollard,

Thanks for your replies - problem solved. During import it was taking extra junk character after shell field, when removed everything started smoothly.

Thanks to all of you.

Presently I am facing two different problems, if you kindly help -

1. after creating the users, all usernames are coming in the login screen - I don't want this but unable to understand where and how to start.

2. The same server is having samba also for user home directory - so I have to import thsese users again into samba. How to do it in batch?
I checked other posts related to this but unable to understand them.
 
Old 07-18-2014, 11:11 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Assuming you are using gdm, then /apps/gdm/simple-greeter/disable_user_list, set the value to "true" (https://help.gnome.org/admin/gdm/sta....en#userconfig) should do the trick.

Samba is not a good server for Linux clients. It is intended only for Windows support.

You get much better interaction with NFS or Gluster.
 
1 members found this post helpful.
Old 07-18-2014, 06:25 PM   #6
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
If the users were imported into the Samba server as part of your earlier issue, they should have accounts and UIDs/GIDs already in place. If not, you'd add them as users on the Samba server in much the same way you did before.
 
Old 07-25-2014, 05:52 AM   #7
somnathndy
Member
 
Registered: May 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Hi dijetlo,

Thank you for your reply but unable to understand the part - "you'd add them as users on the Samba server in much the same way you did before" - the same newuser command will work? how?
 
Old 07-25-2014, 08:23 AM   #8
somnathndy
Member
 
Registered: May 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Hi All,
Integration with AD complete as I am able to login from any terminal to any server under AD. But if I am logging from a linux(RHEL) I am getting following errors -

A. "Could not retrieve information about the file - Error starting file /home/domain/username - no such directory"

B. "Could not update ICEauthority file /home/<domain>/<username>/.ICEauthority"

C. "There is a problem with the configuration server(/usr/libexec/gcon-sanity-check-2 exited with status 256

D. "Nautilus could not create /home/<domain>/......

any idea?

My configuration is - there is one AD with 2 windows server and 2 RHEL 6 server. User home directories are on one one rhel server, samba also configured on it for publishing the home directories(could not publish till date except one or two for testing,as the no of users are more than 600 & could not find out how to publish them with login name, the name of the home directories are identical to login name and kept on a separate volume - which is a storage volume).

Any help?
 
Old 07-26-2014, 05:51 AM   #9
somnathndy
Member
 
Registered: May 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Hi All,
Other than the above problems regarding the logging in from linux terminals, I am not able to connect to the shares which are user home directories(initi I have published one directory & trying to connect from other terminal). Whenever I am trying to connect with share it is saying NT_STATUS_BAD_NETWORK_NAME. For checking I used -
#smbclient -L Server Name -U username@domain name

It gave me exact output and showing the user share.

But whenever I am trying -
#smbclient //server/user share -U username@domain name
after taking password it is showing "NT_STATUS_BAD_NETWORK_NAME"

I checked the log is it showing - [2014/07/26 15:09:38.010479, 0] smbd/service.c:988(make_connection_snum)canonicalize_connect_path failed for service s2015cse001, path /home/GCETTB/s2015cse001.

This is happening after joining AD.

Same problem is happening on the SAMBA server also - though user name is a valid name on that server and user has been added to the smbpasswd file also.

Any help is most welcome.
 
Old 07-26-2014, 10:57 AM   #10
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Hey Somnathy,

Quote:
you'd add them as users on the Samba server in much the same way you did before
When a user logs into a network file server they have to have an account. It's the account that establishes the rights that the particular user can exercise, what files they can edit or view, for example. If you have windows users who need access to a Samba file server, Samba has to be able to authenticate the users identity and it has to have some direction (normally it's derived from the user id or group id of the user logging in) to limit their access. If that information is not being supplied across the network (from a security token source like an AD server or Kerberos KDC) then the user has to have a local account.
Quote:
NT_STATUS_BAD_NETWORK_NAME
A really useful tactic for solving problems is to take the error message and do a search on it. You can do it on site by clicking search up by the menu bar (and search linux questions specifically) or you can do the same thing in google. In this instance, however, you'd get the same result.
Are you using SWAT?
That guy did an very useful thing, if you look at his solution, he changed the logging level to 3, which gives you more detail in your logs.
Try a couple of solutions suggested or do some more reading from a google search. Keep track of what you've tried and let us know what you've done to this point and then, if you're still stuck, post back with that information and we'll be better able to help you.
 
Old 07-29-2014, 05:44 AM   #11
somnathndy
Member
 
Registered: May 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Hi all,

I have to import users into SAMBA(smbpasswd) in batch. It is around 700 now. User addition in RHEL part is done with creation of respective home directories. Please help me with a script which will import user names and passwords from a text/csv file - whatever possible.
 
Old 07-29-2014, 08:55 AM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by somnathndy View Post
Hi all,

I have to import users into SAMBA(smbpasswd) in batch. It is around 700 now. User addition in RHEL part is done with creation of respective home directories. Please help me with a script which will import user names and passwords from a text/csv file - whatever possible.
Again, we are not going to write your scripts for you....and this is the THIRD time you've posted this same question. Even though you already HAVE a script, as you posted in one of your threads.
 
  


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
Batch user creating with the "newusers" command question mainuser Linux - Newbie 1 07-26-2011 07:35 PM
creating newusers and givin passwds in Ubuntu jone kim Linux - General 3 05-06-2011 02:52 PM
cron newusers command ? jchambers Programming 2 10-05-2007 02:38 AM
Using NEWUSERS command hipchatterbug Programming 6 11-30-2006 08:27 AM
newusers - command not found Jayla Linux - Newbie 12 10-23-2006 12:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:18 AM.

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
Open Source Consulting | Domain Registration