OESF Portables Forum

Everything Else => Sharp Zaurus => Model Specific Forums => Distros, Development, and Model Specific Forums => Archived Forums => 6000 - Tosa => Topic started by: gdog on July 28, 2004, 07:34:23 pm

Title: Adding users, and where's all the commands?
Post by: gdog on July 28, 2004, 07:34:23 pm
Had to vi the /etc/passwd to create a new user, but there is no pwconv command, and so I can't get the shadow file to update  

Also, there's no useradd, usermod, or diff commands, and I'm sure I'm going to find others. No man pages either, which I can understand due to space constraints. Is there documentation anywhere on the command set that does exist on this little jewel?

Thanks,

gdog
Title: Adding users, and where's all the commands?
Post by: Stubear on July 28, 2004, 08:16:37 pm
Most of the command on the Zaurus are from busybox, type busybox -v to see all commands that the version on your machine can do.

Other CLI linunx commands are in /sbin, /bin, /usr/sbin and /usr/bin. There are a numbe of packages available to add most of the usual commands.
Title: Adding users, and where's all the commands?
Post by: gdog on July 28, 2004, 08:44:06 pm
Hey thanks Stu. I'll take a look.

Regards,

gdog
Title: Adding users, and where's all the commands?
Post by: tumnus on July 29, 2004, 03:16:05 am
All the user stuff uses tinylogin in a similar way to busybox.

There is adduser and addgroup already. If you look around at various Zaurus software sites/feeds you'll probably find the missing commands. You can also use the Debian ARM feed.
Title: Adding users, and where's all the commands?
Post by: gdog on July 29, 2004, 09:51:10 am
Busybox seems to be missing from my Z. Not sure what you mean by "user stuff" tumnus, but I'd sure like to find the pwconv command somewhere. I've never used useradd or usermod, instead relying on good ole vi and pwconv to update the shadow. I have some bad habits I'm sure, but it's gettin kind of late in the game to change now  

I had no idea we could use the debian arm builds. Are there any limitations to that?

Thanks,

gdog
Title: Adding users, and where's all the commands?
Post by: Stubear on July 29, 2004, 11:19:11 am
Quote
Busybox seems to be missing from my Z. Not sure what you mean by "user stuff" tumnus, but I'd sure like to find the pwconv command somewhere. I've never used useradd or usermod, instead relying on good ole vi and pwconv to update the shadow. I have some bad habits I'm sure, but it's gettin kind of late in the game to change now  

I had no idea we could use the debian arm builds. Are there any limitations to that?

Thanks,

gdog
What ROM are you using?

On my C760

Code: [Select]
$ which busybox
/bin/busybox

You can edit the shadow file with vi - leave the password blank and change it with passwd
Just copy the root entry and make sure there is nothing betwen the first 2 colons (directly after the username)

The only limitations on debian arm binaries I've found is that they must be compiled with gcc2.95 and need to CLI apps - although you can use X apps with X/Qt

Stu
Title: Adding users, and where's all the commands?
Post by: gdog on July 29, 2004, 10:53:28 pm
I found busybox Stu. No diff in there but there are some other useful commands. Cool concept.

I'll try taking the x out from between the two colons and see if the shadow file likes that. I did copy the root entry because I wanted the new account to have the gid and uid of zero. Tried the same thing with the zaurus account but that's a different story. As it is now I can't su to the new account because it complains the shadow file doesn't recognize it. It's crying for pwconv or usermod  

I'm going to spend the next free time that I have trying to get putty working on my PC and ssh going on the z. I am behind a firewall, but not a good or recent one. One of these days I hope to have the time to master ip tables, but that will have to wait I'm afraid.

Thanks for the tips Stu

gdog
Title: Adding users, and where's all the commands?
Post by: Stubear on July 30, 2004, 05:49:16 am
You want the x in /etc/passwd, you need the :: in /etc/shadow

/etc/passwd
Code: [Select]
stu:x:501:501:Stu:/home/stu:/bin/bash
/etc/passwd
Code: [Select]
stu::10933:0:99999:7:::then when you run passwd as stu it will write the password to /etc/shadow,  I've always added users this way - never liked them fandangled gui user tools

Stu
Title: Adding users, and where's all the commands?
Post by: gdog on July 30, 2004, 11:32:54 am
Quote
You want the x in /etc/passwd, you need the :: in /etc/shadow

/etc/passwd
Code: [Select]
stu:x:501:501:Stu:/home/stu:/bin/bash
/etc/passwd
Code: [Select]
stu::10933:0:99999:7:::then when you run passwd as stu it will write the password to /etc/shadow,  I've always added users this way - never liked them fandangled gui user tools

Stu
I take it you meant /etc/shadow in your second illustration Stu. It's been too many years and I have to admit I'd forgotten this trick. I removed the x from the passwd file last night, and that allowed me to change pw, and login, but it also allowed zaurus to su to my account without using a pw, which I surely don't want. I'll use the other method as soon as I have a free moment.

I with you on the fancy gui tools too ;o)

Thanks again,

gdog
Title: Adding users, and where's all the commands?
Post by: Stubear on July 31, 2004, 09:10:43 am
Quote
I take it you meant /etc/shadow in your second illustration Stu. It's been too many years and I have to admit I'd forgotten this trick. I removed the x from the passwd file last night, and that allowed me to change pw, and login, but it also allowed zaurus to su to my account without using a pw, which I surely don't want. I'll use the other method as soon as I have a free moment.

I with you on the fancy gui tools too ;o)

Thanks again,

gdog
Doh, hate it when I do that - starting to lose brain cells too quickly. Yep should have been /etc/shadow in the second example.
Stu
Title: Adding users, and where's all the commands?
Post by: gdog on August 01, 2004, 10:33:31 pm
Quote
Doh, hate it when I do that - starting to lose brain cells too quickly. Yep should have been /etc/shadow in the second example.
Stu
At least you have 'em to lose Stu. I can't remember if I ever did. Strange thing happened, but I can't recall the sequence of events that occurred. I was messing around trying to get ssh working and for some reason the zaurus account, and the one I had created for myself were both gone. I tried to ssh as zaurus and it said something to the effect, "I don't know you, you don't exist, goodbye". Luckily I had backed up the passwd file before I had even tried to create the new account so I was able to just restore that one. The strange thing is that I wasn't even messing with the passwd file during that session.

At least I've got ssh working. Cool stuff to be able to have my Z upstairs and work on it from my PC downstairs, and securely. The whole ssh problem, near as I can figure was something in the 3.7.1 package. As soon as I unstalled it and installed the 3.6.1 package everything came together.

Later,

gdog