Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
02-06-2006, 06:51 PM
|
#1
|
Member
Registered: Oct 2005
Distribution: Debian etch
Posts: 103
Rep:
|
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
|
|
|
02-06-2006, 08:21 PM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
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.
|
|
|
02-07-2006, 11:02 AM
|
#3
|
Member
Registered: Oct 2005
Distribution: Debian etch
Posts: 103
Original Poster
Rep:
|
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"?
|
|
|
02-07-2006, 12:16 PM
|
#4
|
Member
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246
Rep:
|
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
|
|
|
02-07-2006, 12:29 PM
|
#5
|
Member
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246
Rep:
|
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)
|
|
|
02-07-2006, 03:51 PM
|
#6
|
Member
Registered: Oct 2005
Distribution: Debian etch
Posts: 103
Original Poster
Rep:
|
I got your first post, but not your second. What does that stuff pertain to, and what does it mean?
|
|
|
02-07-2006, 04:05 PM
|
#7
|
Member
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246
Rep:
|
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
|
|
|
02-07-2006, 04:37 PM
|
#8
|
Member
Registered: Oct 2005
Distribution: Debian etch
Posts: 103
Original Poster
Rep:
|
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.
|
|
|
02-07-2006, 05:03 PM
|
#9
|
Member
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246
Rep:
|
Sorry - forgot to add that you'll need to edit /etc/shadow too
|
|
|
02-07-2006, 05:36 PM
|
#10
|
Member
Registered: Oct 2005
Distribution: Debian etch
Posts: 103
Original Poster
Rep:
|
How so? The same thing?
|
|
|
02-07-2006, 05:48 PM
|
#11
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
|
Erm, wouldn't it have been easier to just make a link from "/etc/RedNovember" to "/etc/rednovember"?
|
|
|
02-07-2006, 06:03 PM
|
#12
|
Member
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246
Rep:
|
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.
|
|
|
02-07-2006, 06:05 PM
|
#13
|
Member
Registered: Oct 2005
Distribution: Debian etch
Posts: 103
Original Poster
Rep:
|
Sweet, it works now! Granted, KDE is a bit messed up, but that is for another day. Thanks for all the help 
|
|
|
02-07-2006, 06:17 PM
|
#14
|
Member
Registered: Nov 2005
Location: Columbus, OH, USA
Distribution: Slackware
Posts: 246
Rep:
|
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 
|
|
|
02-07-2006, 07:26 PM
|
#15
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
|
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.
|
|
|
All times are GMT -5. The time now is 11:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|