SlackwareThis 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.
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.
Just installed slackware-12.1 and so far so good, but ...
As user 'root' everything is just great. I created .bash_profile and .bashrc to my preference and using xfce - well, suffice to say no probs at all.
As a normal user, however, I have issues.
a) using the same .bash_profile and .bashrc as 'root', they are not honoured on login.
b) however, if I make .profile a link to .bash_profile, it is working (ie my personal settings are honoured again)
c) using xfce, the 'terminal' is not working - it does not react to any keypress and the terminal window remains black. the cursor is coloured, but it doesn't move when I type (ie I am not running 'black' on 'black'). Also, the PROMPT_COMMAND does not alter the 'name' of the terminal window (under 'root' it works just fine)
d) if I bring up 'konsol' rather than 'terminal' - again it works properly.
I see that the screensaver has issues when I log in as normal user, because it says that I started off as {username}:shadow and now I am {username}:users.
Any help to resolve this matter would be greatly appreciated!!
Just installed slackware-12.1 and so far so good, but ...
As user 'root' everything is just great. I created .bash_profile and .bashrc to my preference and using xfce - well, suffice to say no probs at all.
As a normal user, however, I have issues.
a) using the same .bash_profile and .bashrc as 'root', they are not honoured on login.
The files in /root are not allowed to be accessed by users, you will have to either copy them to the /home/$USER directory and change the ownership to the user or make new ones...
fixing this may (or may not) resolve the other issues...
Done that!
Logged in as root, cd to /home/$USER, copied down .bash_profile and .bashrc and then changed ownership to $USER:users
I do a lot of my work as root but like to log in as $USER, open a couple of terminals and then 'su -' to root ... (obviously_after_ having done a 'xhost +')
c) using xfce, the 'terminal' is not working - it does not react to any keypress and the terminal window remains black. the cursor is coloured, but it doesn't move when I type (ie I am not running 'black' on 'black').
I've seen this before. It's a bit of an obscure one, but the good news is that it's nice and easy to fix once you know what's going on.
Issue the following command as root and it should fix it for you:
usermod -s /bin/bash your_login_name
It appears that the xfce/gnome terminal program doesn't like it when the login shell for the user is left to default (i.e. the field is blank in /etc/passwd). Explicitly setting it with the -s option of useradd/usermod fixed it for me.
It appears that the xfce/gnome terminal program doesn't like it when the login shell for the user is left to default (i.e. the field is blank in /etc/passwd). Explicitly setting it with the -s option of useradd/usermod fixed it for me.
Sounds like a possible solution, but out of curiosity, why don't you just setup a login shell when you set up your user account? I guess I'm just used to using `adduser` instead of `useradd` (less memorization and straightforward user setup with basically all options available), which sets a default shell (/bin/bash).
Sounds like a possible solution, but out of curiosity, why don't you just setup a login shell when you set up your user account?
Curiosity killed the cat you know!
Anyway, now I know xfce-terminal is so fussy I do, but prior to that I used to create users with useradd and let anything I didn't care about default.
According to passwd(5) it's perfectly valid to have a blank entry for the user shell. You could argue that it may not necessarily be a good idea as it introduces some uncertainty as to which shell is being used, but that's besides the point. I don't think it's unreasonable to expect the xfce-terminal to either cope with this situation, using /bin/sh as a default, or at the very least throwing out an alert dialog along the lines of "Error: No shell set for user". The fact it just sits there looking stupid and leaving the user to wonder what the hell is going on is either a bug, or poor program design/implementation.
Quote:
Originally Posted by T3slider
I guess I'm just used to using `adduser` instead of `useradd` (less memorization and straightforward user setup with basically all options available), which sets a default shell (/bin/bash).
I'd actually forgotten adduser existed, but even though I've now been reminded , I still wouldn't choose to use it. At the end of the day, I guess its just personal preference.
'adduser' is a script wrapped around the real user maintenance commands. It has no manpage, which immediately puts it in my bad-books. "Thou shalt accompany thy program with a manpage" is the 11th commandment as far as I'm concerned.
So, with no manpage, in order to find out more about the command one is likely to issue something along the lines of:
adduser --help
... and the stupid script thinks you want to create a user called "--help"!
Personally, I try to avoid using wrappers for admin tasks where the underlying commands are perfectly usable. Especially so for poorly written or badly documented wrappers.
I don't know whether it's just because I've been using unix and linux for so long, but
useradd -m -s /bin/bash -g users -G plugdev,cdrom,audio,video gary
... really doesn't seem that hard to me, and is a lot faster to type than working through the adduser prompts. It also has the advantage of being usable from within scripts, and can be recalled/edited multiple times from your command history if you're creating multiple users all at once).
At the end of the day though, if adduser works well enough for you, and its failings don't offend your sensibilities the way they do mine (yep, I'm one of those annoying, overly anal, perfectionist types) then its entirely your choice.
GazL, good points (although if you want to know what adduser is doing you could just issue `less /usr/sbin/adduser` and look at the script). I usually just set up one or two users, so bulk adding (and adding through scripts etc.) has never been an issue for me.
sorry guys - I've been 'out of commission' for a couple of weeks.
and yes and thank you all for the help - I just edited /etc/passwd (vi) and that did the trick!!
Thanks again!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.