LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-10-2003, 05:12 PM   #1
kleptophobiac
Member
 
Registered: Jun 2003
Distribution: Arch
Posts: 315

Rep: Reputation: 30
How can I forcefully add usernames?


I want to have usernames with the format ##xxxxxx

The problem is the number in the front. This is set in stone on our network at school, and there's nothing I can do. I would like to have samba allow access to about five people on this school network with about 2500 users.

Anyway, I would like to add these users, but adduser whines about it. I'm root dammit, no talkback!

Is there anything I can do?

EDIT:
An alternate solution is to make samba prompt for passwords, rather than just take whatever windows sends it.
 
Old 11-10-2003, 06:54 PM   #2
breakerfall
Member
 
Registered: Jun 2003
Location: Manchester, UK
Distribution: Gentoo
Posts: 306

Rep: Reputation: 30
Follow this guide

http://www.astalavista.com/library/b...es/samba.shtml

It will guide you through setting allowed users and passwords.
 
Old 11-10-2003, 07:21 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
You can use brute force, and edit
/etc/passwd and /etc/shadow using
your favourite editor ;) ...

Use one existing user
as "template" .... copy & paste
the line, change the name and
the home directory and make
sure you change the numeric
UID, too ... that done, save passwd,
and change the passwords for
them using passwd

Cheers,
Tink
 
Old 11-10-2003, 07:42 PM   #4
kleptophobiac
Member
 
Registered: Jun 2003
Distribution: Arch
Posts: 315

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Tinkster
You can use brute force, and edit
/etc/passwd and /etc/shadow using
your favourite editor ...

Use one existing user
as "template" .... copy & paste
the line, change the name and
the home directory and make
sure you change the numeric
UID, too ... that done, save passwd,
and change the passwords for
them using passwd

Cheers,
Tink
Thanks!
 
Old 11-11-2003, 04:11 AM   #5
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
If you really want to use brute force, you can edit adduser. It's just a frontend script for useradd/passwd. Lines 131-148 deal with disallowing 'illegal' names.

We'll show that stinkin' adduser who's boss :-)

Enjoy!
--- Cerbere
 
Old 11-11-2003, 11:15 AM   #6
kleptophobiac
Member
 
Registered: Jun 2003
Distribution: Arch
Posts: 315

Original Poster
Rep: Reputation: 30
Well... considering I only added a handful of people, it was just as easy to manually edit.

Maybe I'll "fix" adduser later though.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Forcefully disconnect or drop users help HoOLi Linux - Newbie 4 11-16-2005 02:30 AM
usernames with dots yang11 Linux - Enterprise 2 03-18-2005 07:07 AM
forcefully unloading kernel module saajii Programming 2 09-29-2004 02:04 AM
Logout Forcefully masand Linux - General 2 04-08-2004 05:50 AM
Usernames Zwitterion Linux - General 1 12-25-2002 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:45 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