LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-06-2006, 06:51 PM   #1
RedNovember
Member
 
Registered: Oct 2005
Distribution: Debian etch
Posts: 103

Rep: Reputation: 15
No shift in adduser? not using my previous /home


I finally got x working in slack 10.2, and I'm trying to get it to use my previous /home directory from SuSE. However, when I do adduser, it won't let me enter "RedNovember" (which was my previous user under SuSE). This effectively prevents me from using my previous /home directory. I initially entered "rednovember" before I realized that this was the case.
So I guess I have 2 questions. How do I completely get rid of references to "rednovember", and how do I get Slackware to accept "RedNovember"? I'd really like to be able to use capitalized usernames. I don't really see why this would be prevented, seeing as how SuSE accepted it fine and it's allowed under the filesystem.
Appreciate any help,
RedNovember
 
Old 02-06-2006, 08:21 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I'm not sure what the user name length limit is, but if you copy over the files you can use them still, just use chown to change the username/group.
 
Old 02-07-2006, 11:02 AM   #3
RedNovember
Member
 
Registered: Oct 2005
Distribution: Debian etch
Posts: 103

Original Poster
Rep: Reputation: 15
I guess I could do that, but it seems like a pain. Plus it would take up twice the disk space if I wanted to dual boot with SuSE. Isn't there some way to get slackware to accept "RedNovember"?
 
Old 02-07-2006, 12:16 PM   #4
odevans
Member
 
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246

Rep: Reputation: 30
Have you tried manually editing /etc/passwd?

Run the adduser script (as root)
Set the username to rednovember
Set home dir to /home/RedNovember (or whatever it actually is)
If asked to chown rednovember.users /home/RedNovember answer NO
Finish up adduser
edit /etc/passwd and change the rednovember entry to RedNovember
 
Old 02-07-2006, 12:29 PM   #5
odevans
Member
 
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246

Rep: Reputation: 30
Also, from the /usr/sbin/adduser script:

# v1.04 - 09/06/02
# * Catered for shadow-4.0.3's 'useradd' binary that no longer
# will let you create a user that has any uppercase chars in it
# This was reported on the userlocal.org forums
# by 'xcp' - thanks. <sw,pjv>

(note current version of adduser is 1.09, using shadow 4.0.3)
 
Old 02-07-2006, 03:51 PM   #6
RedNovember
Member
 
Registered: Oct 2005
Distribution: Debian etch
Posts: 103

Original Poster
Rep: Reputation: 15
I got your first post, but not your second. What does that stuff pertain to, and what does it mean?
 
Old 02-07-2006, 04:05 PM   #7
odevans
Member
 
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246

Rep: Reputation: 30
Quote:
Originally Posted by RedNovember
I got your first post, but not your second. What does that stuff pertain to, and what does it mean?
The "adduser" command in Slackware is just a bash script. It takes the answers you provide and creates the "useradd" command (you can see how the command would look by reading the useradd manpage).

That was just a comment from that script. Apparantly, the version of useradd (from the shadow password suite 4.0.3) included with slack doesn't support uppercase letters in usernames.

Seemingly, and somewhat nonsensically, you can still USE uppercase usernames, just not create them with useradd.

Hope it worked for you.

cheers
 
Old 02-07-2006, 04:37 PM   #8
RedNovember
Member
 
Registered: Oct 2005
Distribution: Debian etch
Posts: 103

Original Poster
Rep: Reputation: 15
Weirdly enough it did not work. Here are the steps I took: deleted the previous 'rednovember' from /etc/passwd, created the new 'rednovember', edited /etc/passwd to set the name to 'RedNovember'. Now neither 'rednovember' nor 'RedNovember' work for login to slack.

Perhaps slack just won't accept capitalized usernames? Or maybe I didn't delete the previous user enough? Or is it something wrong with my passwd?

/etc/passwd:
Code:
root:x:0:0::/root:/bin/bash
bin:x:1:1:bin:/bin:
daemon:x:2:2:daemon:/sbin:
adm:x:3:4:adm:/var/log:
lp:x:4:7:lp:/var/spool/lpd:
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/:
news:x:9:13:news:/usr/lib/news:
uucp:x:10:14:uucp:/var/spool/uucppublic:
operator:x:11:0:operator:/root:/bin/bash
games:x:12:100:games:/usr/games:
ftp:x:14:50::/home/ftp:
smmsp:x:25:25:smmsp:/var/spool/clientmqueue:
mysql:x:27:27:MySQL:/var/lib/mysql:/bin/bash
rpc:x:32:32:RPC portmap user:/:/bin/false
sshd:x:33:33:sshd:/:
gdm:x:42:42:GDM:/var/state/gdm:/bin/bash
pop:x:90:90:POP:/:
nobody:x:99:99:nobody:/:

RedNovember:x:1000:100:N Subramanian,,,:/home/RedNovember:/bin/bash
EDIT: Perhaps that line break is messing it up? Time to delete it and go reboot I guess. Thanks for all your help so far.
EDIT #2: That wasn't it. Neither were the commas. I'm stuck for an answer.

Last edited by RedNovember; 02-07-2006 at 04:47 PM.
 
Old 02-07-2006, 05:03 PM   #9
odevans
Member
 
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246

Rep: Reputation: 30
Sorry - forgot to add that you'll need to edit /etc/shadow too
 
Old 02-07-2006, 05:36 PM   #10
RedNovember
Member
 
Registered: Oct 2005
Distribution: Debian etch
Posts: 103

Original Poster
Rep: Reputation: 15
How so? The same thing?
 
Old 02-07-2006, 05:48 PM   #11
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Erm, wouldn't it have been easier to just make a link from "/etc/RedNovember" to "/etc/rednovember"?
 
Old 02-07-2006, 06:03 PM   #12
odevans
Member
 
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246

Rep: Reputation: 30
Quote:
Originally Posted by MS3FGX
Erm, wouldn't it have been easier to just make a link from "/etc/RedNovember" to "/etc/rednovember"?
I'm guessing you meant add a user rednovember and link /home/redn... to /home/RedN...?

That wouldn't work if his existing home dir is owned by RedNovember and user/group names /are/ case sensitive. He may be able to access/edit files in his existing home dir as he would still be in the group 'users', but then, so could any other user, a bit of a security no-no.

Quote:
Originally Posted by RedNovember
How so? The same thing?
Sorta, /etc/shadow contains a hash of your password and is unreadable by anyone but root. /etc/passwd /can/ contain a hashed password, but is world readable - potential security risk (?):

/etc/passwd:
RedNovember:x:1004:100:,,,:/home/RedNovember/:/bin/bash
^username ^UID ^GID ^homedir ^shell


/etc/shadow:
RedNovember:$1$dNV0anKu$WvKgun.DxISGJ.p4iTxot0:13186:0:99999:7:::
^username ^^hash of password

EDIT:
Non-fixed width font in posting messed up those examples.

Last edited by odevans; 02-07-2006 at 06:04 PM.
 
Old 02-07-2006, 06:05 PM   #13
RedNovember
Member
 
Registered: Oct 2005
Distribution: Debian etch
Posts: 103

Original Poster
Rep: Reputation: 15
Sweet, it works now! Granted, KDE is a bit messed up, but that is for another day. Thanks for all the help
 
Old 02-07-2006, 06:17 PM   #14
odevans
Member
 
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246

Rep: Reputation: 30
Quote:
Originally Posted by RedNovember
Sweet, it works now!
Cool!

Quote:
Originally Posted by RedNovember
Granted, KDE is a bit messed up, but that is for another day.
Probably differences between SuSE and Slack


Quote:
Originally Posted by RedNovember
Thanks for all the help
Happy to have helped
 
Old 02-07-2006, 07:26 PM   #15
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Quote:
That wouldn't work if his existing home dir is owned by RedNovember and user/group names /are/ case sensitive. He may be able to access/edit files in his existing home dir as he would still be in the group 'users', but then, so could any other user, a bit of a security no-no.
True, but he could have made a group called "rednovember" on SuSE and Slack, and put the permissions to /home/RedNovember to "rednovember:rednovember" and 770. so while the usernames would have been different, the two users could have been in a specific group and permissions would have worked as they should.

But it is working now, so it does't matter.
 
  


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
adduser but no shell and no home dir ryedunn Linux - Newbie 7 09-05-2011 09:52 AM
Seeing /home (hda6) from a previous install of Fedora Core 3 caleb1011 Linux - Newbie 1 05-26-2005 10:11 PM
/home seperate partition from previous install, make it new /home in new install mipia Slackware 5 06-21-2004 10:57 PM
I have an nfs mounted /home and 'adduser' fails to create a new user dipukm Linux - Software 4 06-01-2004 06:38 PM
RH recovery -- keeping /home from previous drive bock Linux - General 3 01-20-2003 10:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:57 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
Open Source Consulting | Domain Registration